DGtal  0.9.4beta
Public Types | Public Member Functions | Static Public Member Functions | Static Private Member Functions
DGtal::ITKReader< TImage > Struct Template Reference

#include <DGtal/io/readers/ITKReader.h>

Public Types

typedef TImage Image
 
typedef TImage::Value Value
 
typedef ITKIOTrait< Value >::ValueOut ValueOut
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CImage< TImage >))
 
 BOOST_STATIC_ASSERT (((TImage::Domain::dimension==3)||(TImage::Domain::dimension==2)))
 

Static Public Member Functions

template<typename TFunctor = typename ITKIOTrait<typename TImage::Value>::DefaultReadFunctor>
static Image importITK (const std::string &filename, const TFunctor &aFunctor=TFunctor()) throw ( DGtal::IOException )
 
static itk::ImageIOBase::IOComponentType getITKComponentType (const std::string &filename)
 

Static Private Member Functions

template<typename TypeDGtalImage , typename TFunctor >
static Image readDGtalImageFromITKtypes (const std::string &filename, const TFunctor &aFunctor) throw ( DGtal::IOException )
 

Detailed Description

template<typename TImage>
struct DGtal::ITKReader< TImage >

Aim: Import a 2D/3D Image using the ITK formats.

Description of template class 'ITKReader'

Template Parameters
TImagethe Image type.
See also
ITKWriter
ITKIOTrait

Definition at line 64 of file ITKReader.h.

Member Typedef Documentation

template<typename TImage >
typedef TImage DGtal::ITKReader< TImage >::Image

Definition at line 66 of file ITKReader.h.

template<typename TImage >
typedef TImage::Value DGtal::ITKReader< TImage >::Value

Definition at line 67 of file ITKReader.h.

template<typename TImage >
typedef ITKIOTrait<Value>::ValueOut DGtal::ITKReader< TImage >::ValueOut

Definition at line 68 of file ITKReader.h.

Member Function Documentation

template<typename TImage >
DGtal::ITKReader< TImage >::BOOST_CONCEPT_ASSERT ( (concepts::CImage< TImage >)  )
template<typename TImage >
DGtal::ITKReader< TImage >::BOOST_STATIC_ASSERT ( ((TImage::Domain::dimension==3)||(TImage::Domain::dimension==2))  )
template<typename TImage >
static itk::ImageIOBase::IOComponentType DGtal::ITKReader< TImage >::getITKComponentType ( const std::string &  filename)
static

Get the type of the ITK image.

Parameters
filenamename of the input file.
Returns
the ITK image component type.
template<typename TImage >
template<typename TFunctor = typename ITKIOTrait<typename TImage::Value>::DefaultReadFunctor>
static Image DGtal::ITKReader< TImage >::importITK ( const std::string &  filename,
const TFunctor &  aFunctor = TFunctor() 
)
throw (DGtal::IOException
)
static

Import an Image with a format supported by ITK.

First an ImageContainerByITKImage is constructed by using the source type of the input ITK image, and in a second step the resulting image type is adapted to the TImage type with the use of the given Functor.

Parameters
filenamename of the input file.
aFunctorfunctor used to cast image values.
Template Parameters
TFunctorthe type of functor used in the export.
Returns
read image

Referenced by DGtal::GenericReader< TContainer, 3, TValue >::importWithValueFunctor(), and DGtal::GenericReader< TContainer, 3, DGtal::uint32_t >::importWithValueFunctor().

template<typename TImage >
template<typename TypeDGtalImage , typename TFunctor >
static Image DGtal::ITKReader< TImage >::readDGtalImageFromITKtypes ( const std::string &  filename,
const TFunctor &  aFunctor 
)
throw (DGtal::IOException
)
staticprivate

Read an DGtal image of type TypeDGtalImage with a format supported by ITK. (used by importITK)

Parameters
filenamename of the input file
aFunctorfunctor used to cast image values
Template Parameters
TFunctorthe type of functor used in the export.
Returns
read image

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