35 #if defined(ITKReader_RECURSES) 36 #error Recursive header files inclusion detected in ITKReader.h 37 #else // defined(ITKReader_RECURSES) 39 #define ITKReader_RECURSES 41 #if !defined ITKReader_h 45 #include "DGtal/base/Common.h" 46 #include "DGtal/base/CUnaryFunctor.h" 47 #include "DGtal/images/CImage.h" 48 #include "DGtal/base/BasicFunctors.h" 49 #include "DGtal/io/ITKIOTrait.h" 50 #include <itkImageFileReader.h> 63 template <
typename TImage>
71 BOOST_STATIC_ASSERT(( (TImage::Domain::dimension == 3) || (TImage::Domain::dimension == 2) ));
87 template <
typename TFunctor =
90 const std::string & filename,
91 const TFunctor & aFunctor = TFunctor() );
100 static itk::ImageIOBase::IOComponentType
114 template <
typename TypeDGtalImage,
typename TFunctor>
116 const std::string & filename,
117 const TFunctor & aFunctor );
123 #include "DGtal/io/readers/ITKReader.ih" 128 #endif // !defined ITKReader_h 130 #undef ITKReader_RECURSES 131 #endif // else defined(ITKReader_RECURSES) static Image readDGtalImageFromITKtypes(const std::string &filename, const TFunctor &aFunctor)
Aim: Define a simple functor using the static cast operator.
static Image importITK(const std::string &filename, const TFunctor &aFunctor=TFunctor())
Aim: Import a 2D/3D Image using the ITK formats.
DGtal is the top-level namespace which contains all DGtal functions and types.
ITKIOTrait< Value >::ValueOut ValueOut
BOOST_STATIC_ASSERT(((TImage::Domain::dimension==3)||(TImage::Domain::dimension==2)))
Aim: Defines the concept describing a read/write image, having an output iterator.
BOOST_CONCEPT_ASSERT((concepts::CImage< TImage >))
static itk::ImageIOBase::IOComponentType getITKComponentType(const std::string &filename)