DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes
DGtal::ITKWriter< TImage, TFunctor > Struct Template Reference

Export a 2D/3D Image using the ITK formats. More...

#include <DGtal/io/writers/ITKWriter.h>

Public Types

typedef TImage Image
 
typedef TImage::Value Value
 
typedef ITKIOTrait< Value >::ValueOut ValueOut
 
typedef itk::ImageBase< TImage::Domain::dimension >::SpacingValueType ITKSpacingType
 
typedef PointVector< dimension, double > SpacingType
 
typedef TFunctor Functor
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CConstImage< TImage >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CUnaryFunctor< TFunctor, Value, ValueOut >))
 
 BOOST_STATIC_ASSERT (((dimension==3)||(dimension==2)))
 

Static Public Member Functions

static bool exportITK (const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor())
 
static bool exportITK (const std::string &filename, const Image &aImage, const SpacingType &anImgSpacing, const Functor &aFunctor=Functor())
 

Static Public Attributes

static const TImage::Domain::Dimension dimension = TImage::Domain::dimension
 

Detailed Description

template<typename TImage, typename TFunctor = typename ITKIOTrait<typename TImage::Value>::DefaultWriteFunctor>
struct DGtal::ITKWriter< TImage, TFunctor >

Export a 2D/3D Image using the ITK formats.

Description of template class 'ITKWriter'

A functor can be specified to convert image values to ITK file values. ITKIOTrait is used to determine the actual value type used when saving the image.

Template Parameters
TImagethe Image type.
TFunctorthe type of functor used in the export.
See also
ITKReader
ITKIOTrait

Definition at line 64 of file ITKWriter.h.

Member Typedef Documentation

◆ Functor

template<typename TImage , typename TFunctor = typename ITKIOTrait<typename TImage::Value>::DefaultWriteFunctor>
typedef TFunctor DGtal::ITKWriter< TImage, TFunctor >::Functor

Definition at line 74 of file ITKWriter.h.

◆ Image

template<typename TImage , typename TFunctor = typename ITKIOTrait<typename TImage::Value>::DefaultWriteFunctor>
typedef TImage DGtal::ITKWriter< TImage, TFunctor >::Image

Definition at line 68 of file ITKWriter.h.

◆ ITKSpacingType

template<typename TImage , typename TFunctor = typename ITKIOTrait<typename TImage::Value>::DefaultWriteFunctor>
typedef itk::ImageBase<TImage::Domain::dimension>::SpacingValueType DGtal::ITKWriter< TImage, TFunctor >::ITKSpacingType

Definition at line 71 of file ITKWriter.h.

◆ SpacingType

template<typename TImage , typename TFunctor = typename ITKIOTrait<typename TImage::Value>::DefaultWriteFunctor>
typedef PointVector<dimension, double> DGtal::ITKWriter< TImage, TFunctor >::SpacingType

Definition at line 72 of file ITKWriter.h.

◆ Value

template<typename TImage , typename TFunctor = typename ITKIOTrait<typename TImage::Value>::DefaultWriteFunctor>
typedef TImage::Value DGtal::ITKWriter< TImage, TFunctor >::Value

Definition at line 69 of file ITKWriter.h.

◆ ValueOut

template<typename TImage , typename TFunctor = typename ITKIOTrait<typename TImage::Value>::DefaultWriteFunctor>
typedef ITKIOTrait<Value>::ValueOut DGtal::ITKWriter< TImage, TFunctor >::ValueOut

Definition at line 70 of file ITKWriter.h.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT() [1/2]

template<typename TImage , typename TFunctor = typename ITKIOTrait<typename TImage::Value>::DefaultWriteFunctor>
DGtal::ITKWriter< TImage, TFunctor >::BOOST_CONCEPT_ASSERT ( (concepts::CConstImage< TImage >)  )

◆ BOOST_CONCEPT_ASSERT() [2/2]

template<typename TImage , typename TFunctor = typename ITKIOTrait<typename TImage::Value>::DefaultWriteFunctor>
DGtal::ITKWriter< TImage, TFunctor >::BOOST_CONCEPT_ASSERT ( (concepts::CUnaryFunctor< TFunctor, Value, ValueOut >)  )

◆ BOOST_STATIC_ASSERT()

template<typename TImage , typename TFunctor = typename ITKIOTrait<typename TImage::Value>::DefaultWriteFunctor>
DGtal::ITKWriter< TImage, TFunctor >::BOOST_STATIC_ASSERT ( ((dimension==3)||(dimension==2))  )

◆ exportITK() [1/2]

template<typename TImage , typename TFunctor = typename ITKIOTrait<typename TImage::Value>::DefaultWriteFunctor>
static bool DGtal::ITKWriter< TImage, TFunctor >::exportITK ( const std::string &  filename,
const Image aImage,
const Functor aFunctor = Functor() 
)
static

Export an Image with a format supported by ITK.

Parameters
filenamename of the output file
aImagethe image to export
aFunctorfunctor used to cast image values
Returns
true if no errors occur.

Referenced by testITKSpacingIO().

◆ exportITK() [2/2]

template<typename TImage , typename TFunctor = typename ITKIOTrait<typename TImage::Value>::DefaultWriteFunctor>
static bool DGtal::ITKWriter< TImage, TFunctor >::exportITK ( const std::string &  filename,
const Image aImage,
const SpacingType anImgSpacing,
const Functor aFunctor = Functor() 
)
static

Export an Image with a format supported by ITK.

Parameters
filenamename of the output file
aImagethe image to export
anImgSpacingthe custom spacing represented by a point.
aFunctorfunctor used to cast image values
Returns
true if no errors occur.

Field Documentation

◆ dimension

template<typename TImage , typename TFunctor = typename ITKIOTrait<typename TImage::Value>::DefaultWriteFunctor>
const TImage::Domain::Dimension DGtal::ITKWriter< TImage, TFunctor >::dimension = TImage::Domain::dimension
static

Definition at line 66 of file ITKWriter.h.


The documentation for this struct was generated from the following file: