31#if defined(ITKWriter_RECURSES)
32#error Recursive header files inclusion detected in ITKWriter.h
35#define ITKWriter_RECURSES
37#if !defined ITKWriter_h
41#include "DGtal/images/CConstImage.h"
42#include "DGtal/images/ImageContainerByITKImage.h"
43#include "DGtal/base/Common.h"
44#include "DGtal/base/CUnaryFunctor.h"
45#include "DGtal/base/BasicFunctors.h"
46#include "DGtal/io/ITKIOTrait.h"
63 template <typename TImage, typename TFunctor = typename ITKIOTrait<typename TImage::Value>::DefaultWriteFunctor >
66 static const typename TImage::Domain::Dimension
dimension = TImage::Domain::dimension;
69 typedef typename TImage::Value
Value;
71 typedef typename itk::ImageBase<TImage::Domain::dimension>::SpacingValueType
ITKSpacingType;
109template <
typename TDomain,
typename TValue,
typename TFunctor >
135#include "DGtal/io/writers/ITKWriter.ih"
142#undef ITKWriter_RECURSES
Aim: implements a model of CImageContainer using a ITK Image.
Aim: Implements basic operations that will be used in Point and Vector classes.
DGtal is the top-level namespace which contains all DGtal functions and types.
BOOST_STATIC_ASSERT(((Image::Domain::dimension==3)||(Image::Domain::dimension==2)))
static bool exportITK(const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor())
ImageContainerByITKImage< TDomain, TValue > Image
BOOST_CONCEPT_ASSERT((concepts::CUnaryFunctor< TFunctor, Value, ValueOut >))
ITKIOTrait< Value >::ValueOut ValueOut
Export a 2D/3D Image using the ITK formats.
BOOST_CONCEPT_ASSERT((concepts::CConstImage< TImage >))
static const TImage::Domain::Dimension dimension
static bool exportITK(const std::string &filename, const Image &aImage, const SpacingType &anImgSpacing, const Functor &aFunctor=Functor())
ITKIOTrait< Value >::ValueOut ValueOut
BOOST_STATIC_ASSERT(((dimension==3)||(dimension==2)))
itk::ImageBase< TImage::Domain::dimension >::SpacingValueType ITKSpacingType
BOOST_CONCEPT_ASSERT((concepts::CUnaryFunctor< TFunctor, Value, ValueOut >))
static bool exportITK(const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor())
PointVector< dimension, double > SpacingType
Aim: Defines the concept describing a read-only image, which is a refinement of CPointFunctor.
Aim: Defines a unary functor, which associates arguments to results.