DGtal  1.5.beta
DGtal::ITKReader< TImage > Struct Template Reference

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

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

Data Structures

struct  Aux
 
struct  Aux< ImageContainerByITKImage< Domain, Value >, Domain, OrigValue, TFunctor, Value >
 

Public Types

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

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CImage< TImage >))
 

Static Public Member Functions

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

Static Private Member Functions

template<typename Domain , typename PixelType >
static ImageContainerByITKImage< Domain, PixelType > readDGtalITKImage (const std::string &filename, bool shiftDomainUsingOrigin=true)
 
template<typename TypeDGtalImage , typename TFunctor >
static Image readDGtalImageFromITKtypes (const std::string &filename, const TFunctor &aFunctor, bool shiftDomainUsingOrigin=true)
 

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 79 of file ITKReader.h.

Member Typedef Documentation

◆ Image

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

Definition at line 81 of file ITKReader.h.

◆ Value

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

Definition at line 82 of file ITKReader.h.

◆ ValueOut

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

Definition at line 83 of file ITKReader.h.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

template<typename TImage >
DGtal::ITKReader< TImage >::BOOST_CONCEPT_ASSERT ( (concepts::CImage< TImage >)  )

◆ getITKComponentType()

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.

◆ importITK() [1/2]

template<typename TImage >
static Image DGtal::ITKReader< TImage >::importITK ( const std::string &  filename,
bool  shiftDomainUsingOrigin 
)
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 a default ITKIOTrait::DefaultReadFunctor.

Parameters
filenamename of the input file.
shiftDomainUsingOriginshift the image domain according to the physical information of the source image)
Returns
read image

◆ importITK() [2/2]

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(),
bool  shiftDomainUsingOrigin = true 
)
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.
shiftDomainUsingOriginshift the image domain according to the physical information of the source image)
Template Parameters
TFunctorthe type of functor used in the export.
Returns
read image

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

◆ readDGtalImageFromITKtypes()

template<typename TImage >
template<typename TypeDGtalImage , typename TFunctor >
static Image DGtal::ITKReader< TImage >::readDGtalImageFromITKtypes ( const std::string &  filename,
const TFunctor &  aFunctor,
bool  shiftDomainUsingOrigin = true 
)
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
shiftDomainUsingOriginshift the image domain according to the physical information of the source image)
Template Parameters
TFunctorthe type of functor used in the export.
Returns
read image

◆ readDGtalITKImage()

template<typename TImage >
template<typename Domain , typename PixelType >
static ImageContainerByITKImage<Domain, PixelType> DGtal::ITKReader< TImage >::readDGtalITKImage ( const std::string &  filename,
bool  shiftDomainUsingOrigin = true 
)
inlinestaticprivate

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