DGtal  1.4.2
DGtal::DicomReader< TImageContainer, TFunctor > Struct Template Reference

Aim: Import a 3D DICOM image from file series. More...

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

Data Structures

struct  Aux
 
struct  Aux< ImageContainerByITKImage< Domain, OutPixelType >, Domain, OutPixelType, PixelType >
 

Public Types

typedef TImageContainer ImageContainer
 
typedef TImageContainer::Value Value
 
typedef TFunctor Functor
 
typedef int32_t PixelType
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CImage< ImageContainer >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CUnaryFunctor< Functor, PixelType, Value >))
 
 BOOST_STATIC_ASSERT ((TImageContainer::Domain::dimension==3))
 

Static Public Member Functions

static ImageContainer importDicom (const std::string &aFilename, const Functor &aFunctor=Functor())
 
static ImageContainer importDicomSeries (const std::vector< std::string > &filenames, const Functor &aFunctor=Functor())
 

Static Private Member Functions

template<typename Domain , typename PixelType >
static ImageContainerByITKImage< Domain, PixelTypeimportDicomFiles_ (const std::vector< std::string > &filenames)
 
template<typename PixelType >
static TImageContainer importDicomFiles (const std::vector< std::string > &filenames, const TFunctor &aFunctor)
 

Detailed Description

template<typename TImageContainer, typename TFunctor = functors::Cast< typename TImageContainer::Value >>
struct DGtal::DicomReader< TImageContainer, TFunctor >

Aim: Import a 3D DICOM image from file series.

Description of class 'DicomReader'

This class requires ITK installation (http://www.itk.org/ITK/resources/software.html) and to compile DGtal with -DWITH_ITK option.

Simple example: (extract from test/io/readers/testDicomReader.cpp)

#include "DGtal/images/ImageContainerBySTLVector.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/io/readers/DicomReader.h"
...
typedef ImageContainerBySTLVector<DGtal::Z3i::Domain, unsigned char > Image3D;
string filename = "test.dcm";
Image3D image = DicomReader< Image3D, Rescaling<int32_t,Image3D::Value> >::importDicom(
filename, Rescaling<int32_t,Image3D::Value>(-900,530,0,255) );
static ImageContainer importDicom(const std::string &aFilename, const Functor &aFunctor=Functor())
Template Parameters
TImageContainerthe type of the image container
TFunctorthe type of functor used in the import (you can use the Rescaling as in the example above).

Definition at line 91 of file DicomReader.h.

Member Typedef Documentation

◆ Functor

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
typedef TFunctor DGtal::DicomReader< TImageContainer, TFunctor >::Functor

Definition at line 98 of file DicomReader.h.

◆ ImageContainer

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
typedef TImageContainer DGtal::DicomReader< TImageContainer, TFunctor >::ImageContainer

Definition at line 96 of file DicomReader.h.

◆ PixelType

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
typedef int32_t DGtal::DicomReader< TImageContainer, TFunctor >::PixelType

Definition at line 99 of file DicomReader.h.

◆ Value

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
typedef TImageContainer::Value DGtal::DicomReader< TImageContainer, TFunctor >::Value

Definition at line 97 of file DicomReader.h.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT() [1/2]

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
DGtal::DicomReader< TImageContainer, TFunctor >::BOOST_CONCEPT_ASSERT ( (concepts::CImage< ImageContainer >)  )

◆ BOOST_CONCEPT_ASSERT() [2/2]

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
DGtal::DicomReader< TImageContainer, TFunctor >::BOOST_CONCEPT_ASSERT ( (concepts::CUnaryFunctor< Functor, PixelType, Value >)  )

◆ BOOST_STATIC_ASSERT()

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
DGtal::DicomReader< TImageContainer, TFunctor >::BOOST_STATIC_ASSERT ( (TImageContainer::Domain::dimension==3)  )

◆ importDicom()

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
static ImageContainer DGtal::DicomReader< TImageContainer, TFunctor >::importDicom ( const std::string &  aFilename,
const Functor aFunctor = Functor() 
)
static

Main method to import a Dicom serie into an instance of the template parameter ImageContainer.

Parameters
aFilenameone file of the serie to import.
aFunctorthe functor used to import and cast the source image values into the type of the image container value (by default set to functors::Cast < TImageContainer::Value >.
Returns
an instance of the ImageContainer.

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

◆ importDicomFiles()

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
template<typename PixelType >
static TImageContainer DGtal::DicomReader< TImageContainer, TFunctor >::importDicomFiles ( const std::vector< std::string > &  filenames,
const TFunctor &  aFunctor 
)
inlinestaticprivate

◆ importDicomFiles_()

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
template<typename Domain , typename PixelType >
static ImageContainerByITKImage<Domain, PixelType> DGtal::DicomReader< TImageContainer, TFunctor >::importDicomFiles_ ( const std::vector< std::string > &  filenames)
inlinestaticprivate

◆ importDicomSeries()

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
static ImageContainer DGtal::DicomReader< TImageContainer, TFunctor >::importDicomSeries ( const std::vector< std::string > &  filenames,
const Functor aFunctor = Functor() 
)
static

Main method to import a Dicom serie into an instance of the template parameter ImageContainer.

Parameters
filenamesfiles of the serie to import.
aFunctorthe functor used to import and cast the source image values into the type of the image container value (by default set to functors::Cast < TImageContainer::Value >.
Returns
an instance of the ImageContainer.

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