#include <irtkFileToImage.h>
This is the abstract base class which defines a common interface for all filters which take a filename (referrencing an image file) as input and produce an image as output. For each file format a derived class should be created. Each derived class has to implement abstract member functions ReadHeader() and CheckHeader().
Definition at line 27 of file irtkFileToImage.h.
Public Member Functions | |
irtkFileToImage () | |
Contructor. | |
virtual | ~irtkFileToImage () |
Destructor. | |
virtual void | SetInput (const char *) |
Set input. | |
virtual irtkImage * | GetOutput () |
Get output. | |
virtual int | GetDebugFlag () |
Get debug flag. | |
virtual void | PutDebugFlag (int) |
Put debug flag. | |
virtual void | Print () |
Print image file information. | |
virtual void | Debug (char *) |
Print debugging info. | |
virtual const char * | NameOfClass ()=0 |
Static Public Member Functions | |
static irtkFileToImage * | New (const char *) |
Static constructor. | |
Protected Member Functions | |
virtual void | ReadHeader ()=0 |
Read header. | |
Protected Attributes | |
irtkImageAttributes | _attr |
Image attributes. | |
int | _bytes |
No. of bytes per voxel. Should be initialized by calling ReadHeader(). | |
int | _type |
Type of voxels. Should be initialized by calling ReadHeader(). | |
float | _slope |
Intensity scaling parameter - slope (default: 1). | |
float | _intercept |
Intensity scaling parameter - intercept (default: 0). | |
int | _start |
Start of image data. | |
int | _reflectX |
Flag whether to reflect X axis. | |
int | _reflectY |
Flag whether to reflect Y axis. | |
int | _reflectZ |
Flag whether to reflect Z axis. | |
int | _debug |
Debug flag. |
virtual void irtkFileToImage::ReadHeader | ( | ) | [protected, pure virtual] |
Read header.
This is an abstract function. Each derived class has to implement this function in order to initialize image dimensions, voxel dimensions, voxel type and a lookup table which the address for each slice.
Implemented in irtkFileANALYZEToImage, irtkFileGIPLToImage, irtkFileNIFTIToImage, irtkFilePGMToImage, and irtkFileVTKToImage.
static irtkFileToImage* irtkFileToImage::New | ( | const char * | ) | [static] |
Static constructor.
This constructor allocates a derived class which is then used to read the image file. This involves checking the file format of the file and dynamically allocating the corresonding derived class.