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.
ITKIOTrait< Value >::ValueOut ValueOut
BOOST_STATIC_ASSERT(((Image::Domain::dimension==3)||(Image::Domain::dimension==2)))
ImageContainerByITKImage< TDomain, TValue > Image
static bool exportITK(const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor())
BOOST_CONCEPT_ASSERT((concepts::CUnaryFunctor< TFunctor, Value, ValueOut >))
Export a 2D/3D Image using the ITK formats.
PointVector< dimension, double > SpacingType
BOOST_CONCEPT_ASSERT((concepts::CConstImage< TImage >))
ITKIOTrait< Value >::ValueOut ValueOut
static const TImage::Domain::Dimension dimension
itk::ImageBase< TImage::Domain::dimension >::SpacingValueType ITKSpacingType
static bool exportITK(const std::string &filename, const Image &aImage, const SpacingType &anImgSpacing, const Functor &aFunctor=Functor())
BOOST_STATIC_ASSERT(((dimension==3)||(dimension==2)))
BOOST_CONCEPT_ASSERT((concepts::CUnaryFunctor< TFunctor, Value, ValueOut >))
static bool exportITK(const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor())
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.