DGtal  0.9.4beta
Public Types | Public Member Functions | Static Public Member Functions
DGtal::DicomReader< TImageContainer, TFunctor > Struct Template Reference

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

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()) throw (DGtal::IOException)
 

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) );
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 90 of file DicomReader.h.

Member Typedef Documentation

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

Definition at line 97 of file DicomReader.h.

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

Definition at line 95 of file DicomReader.h.

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

Definition at line 98 of file DicomReader.h.

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

Definition at line 96 of file DicomReader.h.

Member Function Documentation

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
DGtal::DicomReader< TImageContainer, TFunctor >::BOOST_CONCEPT_ASSERT ( (concepts::CImage< ImageContainer >)  )
template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
DGtal::DicomReader< TImageContainer, TFunctor >::BOOST_CONCEPT_ASSERT ( (concepts::CUnaryFunctor< Functor, PixelType, Value >)  )
template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
DGtal::DicomReader< TImageContainer, TFunctor >::BOOST_STATIC_ASSERT ( (TImageContainer::Domain::dimension==3)  )
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() 
)
throw (DGtal::IOException
)
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().


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