Chaste  Build::
ImageReader Class Reference

#include <ImageReader.hpp>

+ Collaboration diagram for ImageReader:

Public Member Functions

 ImageReader ()
 
 ~ImageReader ()
 
vtkSmartPointer< vtkImageData > GetImage ()
 
void SetFilename (const std::string &rFilename)
 
void SetImageResizeFactors (double factorX, double factorY=1.0, double factorZ=1.0)
 
void Read ()
 

Static Public Member Functions

static boost::shared_ptr< ImageReaderCreate ()
 

Private Attributes

vtkSmartPointer< vtkImageData > mpVtkImage
 
std::string mFilepath
 
double mResizeX
 
double mResizeY
 
double mResizeZ
 

Detailed Description

This class reads images in VTK compatible formats. The image can be optionally resized, which often needs to be the first operation in the workflow for memory reasons.

Definition at line 48 of file ImageReader.hpp.

Constructor & Destructor Documentation

ImageReader::ImageReader ( )

Constructor

Definition at line 47 of file ImageReader.cpp.

ImageReader::~ImageReader ( )

Destructor

Definition at line 63 of file ImageReader.cpp.

Member Function Documentation

boost::shared_ptr< ImageReader > ImageReader::Create ( )
static

Factory constructor method

Returns
a shared pointer to a instance of this class

Definition at line 57 of file ImageReader.cpp.

vtkSmartPointer< vtkImageData > ImageReader::GetImage ( )

Get the image in vti format

Definition at line 69 of file ImageReader.cpp.

References mpVtkImage.

void ImageReader::Read ( )

Do the read operation

Definition at line 93 of file ImageReader.cpp.

References mFilepath, mpVtkImage, mResizeX, mResizeY, and mResizeZ.

void ImageReader::SetFilename ( const std::string &  rFilename)

Set the filename for the readers and writers

Parameters
rFilenamethe file name

Definition at line 81 of file ImageReader.cpp.

References mFilepath.

void ImageReader::SetImageResizeFactors ( double  factorX,
double  factorY = 1.0,
double  factorZ = 1.0 
)

Set the resize factors for the image

Parameters
factorXthe fraction of pixels to retain in x
factorYthe fraction of pixels to retain in y
factorZthe fraction of pixels to retain in z

Definition at line 86 of file ImageReader.cpp.

References mResizeX, mResizeY, and mResizeZ.

Member Data Documentation

std::string ImageReader::mFilepath
private

Path to the image

Definition at line 61 of file ImageReader.hpp.

Referenced by Read(), and SetFilename().

vtkSmartPointer<vtkImageData> ImageReader::mpVtkImage
private

The image in vtk format

Definition at line 56 of file ImageReader.hpp.

Referenced by GetImage(), and Read().

double ImageReader::mResizeX
private

The fraction of pixels to retain in X after reading

Definition at line 66 of file ImageReader.hpp.

Referenced by Read(), and SetImageResizeFactors().

double ImageReader::mResizeY
private

The fraction of pixels to retain in Y after reading

Definition at line 71 of file ImageReader.hpp.

Referenced by Read(), and SetImageResizeFactors().

double ImageReader::mResizeZ
private

The fraction of pixels to retain in Z after reading

Definition at line 76 of file ImageReader.hpp.

Referenced by Read(), and SetImageResizeFactors().


The documentation for this class was generated from the following files: