31 #if defined(ITKWriter_RECURSES)
32 #error Recursive header files inclusion detected in ITKWriter.h
33 #else // defined(ITKWriter_RECURSES)
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;
71 typedef typename itk::ImageBase<TImage::Domain::dimension>::SpacingValueType
ITKSpacingType;
88 static bool exportITK(
const std::string & filename,
const Image &aImage,
99 static bool exportITK(
const std::string & filename,
const Image &aImage,
109 template <
typename TDomain,
typename TValue,
typename TFunctor >
118 BOOST_STATIC_ASSERT(( (Image::Domain::dimension == 3) || (Image::Domain::dimension == 2) ));
127 static bool exportITK(
const std::string & filename,
const Image &aImage,
135 #include "DGtal/io/writers/ITKWriter.ih"
140 #endif // !defined ITKWriter_h
142 #undef ITKWriter_RECURSES
143 #endif // else defined(ITKWriter_RECURSES)
static bool exportITK(const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor())
Aim: implements a model of CImageContainer using a ITK Image.
Export a 2D/3D Image using the ITK formats.
static const TImage::Domain::Dimension dimension
BOOST_CONCEPT_ASSERT((concepts::CConstImage< TImage >))
ITKIOTrait< Value >::ValueOut ValueOut
DGtal is the top-level namespace which contains all DGtal functions and types.
BOOST_STATIC_ASSERT(((dimension==3)||(dimension==2)))
PointVector< dimension, double > SpacingType
itk::ImageBase< TImage::Domain::dimension >::SpacingValueType ITKSpacingType
Aim: Implements basic operations that will be used in Point and Vector classes.
ImageContainerByITKImage< TDomain, TValue > Image
Aim: Defines a unary functor, which associates arguments to results.
Aim: Defines the concept describing a read-only image, which is a refinement of CPointFunctor.
ITKIOTrait< Value >::ValueOut ValueOut