fw4spl
fwItkIO Namespace Reference

The namespace fwItkIO contains reader, writer and helper for itk image. More...

Classes

class  ImageIOFactoryRegistrar
 The purpose of this class is to automatically register a Concrete ImageIOFactory in the factory database of ITK ( itk::ObjectFactoryBase ). More...
 
class  ImageReader
 
class  ImageWriter
 
struct  ITKLoaderFunctor
 
struct  ITKSaverFunctor
 
class  JpgImageWriter
 
struct  JpgITKSaverFunctor
 
class  LocalCommand
 
class  ProgressItkToFw
 
class  Progressor
 
class  ProgressorBase
 

Functions

template<class ITKIMAGE >
::fwData::Image::sptr dataImageFactory (typename ITKIMAGE::Pointer itkImage, bool bufferManagerIsDataImage=true)
 Allocate a new data Image from an itk one. More...
 
template<class ITKIMAGE >
void dataImageFactory (typename ITKIMAGE::Pointer itkImage,::fwData::Image::sptr _dataImage, bool bufferManagerIsDataImage=true)
 Update a data Image from an itk one. More...
 
template<class ITKIMAGE >
ITKIMAGE::Pointer itkImageFactory (::fwData::Image::csptr imageData, bool bufferManagerIsDataImage=true)
 Create an ITK image from an fwData::Image. More...
 
template<class ITKIMAGE_PTR >
void itkImageToFwDataImage (ITKIMAGE_PTR itkImage,::fwData::Image::sptr _dataImage)
 
template<class ITKIMAGE >
ITKIMAGE::Pointer fwDataImageToItkImage (::fwData::Image::csptr imageData, bool bufferManagerIsDataImage)
 
template<class PIXELTYPE , int VDimension, class ScannerType >
ScannerType::Pointer itkppScannerFactory (::fwData::Image::sptr imageData)
 

Detailed Description

The namespace fwItkIO contains reader, writer and helper for itk image.

Function Documentation

template<class ITKIMAGE >
::fwData::Image::sptr fwItkIO::dataImageFactory ( typename ITKIMAGE::Pointer  itkImage,
bool  bufferManagerIsDataImage = true 
)

Allocate a new data Image from an itk one.

If bufferManagerIsDataImage = true, itkImage releases buffer management and so fwData::Image manages it (in this case, itkImage must be the owner of this buffer). if bufferManagerIsDataImage = false, the created fwData::Image does not manage the image buffer.

Definition at line 73 of file itk.hxx.

References SLM_ASSERT.

template<class ITKIMAGE >
void fwItkIO::dataImageFactory ( typename ITKIMAGE::Pointer  itkImage,
::fwData::Image::sptr  _dataImage,
bool  bufferManagerIsDataImage = true 
)

Update a data Image from an itk one.

If bufferManagerIsDataImage = true, itkImage releases buffer management and so fwData::Image manages it (in this case, itkImage must be the owner of this buffer). if bufferManagerIsDataImage = false, the created fwData::Image does not manage the image buffer.

itk image release its management buffer. dataImage must now deal memory

itk image release its management buffer. dataImage must now deal memory

Definition at line 23 of file itk.hxx.

References fwDataTools::helper::Array::setBuffer(), and SLM_ASSERT.

+ Here is the call graph for this function:

template<class ITKIMAGE >
ITKIMAGE::Pointer fwItkIO::itkImageFactory ( ::fwData::Image::csptr  imageData,
bool  bufferManagerIsDataImage = true 
)

Create an ITK image from an fwData::Image.

If bufferManagerIsDataImage = true, imageData conserve his buffer management and so the created itkImage not manages it. If bufferManagerIsDataImage = false, the created itkImage manage his image buffer and thus imageData releases his buffer (in this case, imageData must be the owner of this buffer).

Precondition
an assertion check if ITKIMAGE::PixelType correspond to imageData->getPixelType
an assertion check if ITKIMAGE dimension correspond to imageData dimension

Definition at line 149 of file itk.hxx.