Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkRawFilesReader Class Reference

mitkRawFilesReader - a concrete reader for reading a series of files contain raw data (no header information). More...

#include <mitkRawFilesReader.h>

Inherits mitkVolumeReader, and mitkVolumeReader.

Inheritance diagram for mitkRawFilesReader:

Inheritance graph
[legend]
Collaboration diagram for mitkRawFilesReader:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void PrintSelf (ostream &os)
 mitkRawFilesReader ()
void SetWidth (int w)
void SetHeight (int h)
void SetSpacingX (float px)
void SetSpacingY (float py)
void SetSpacingZ (float pz)
void SetChannelNum (int n)
void SetTitleBytes (int n)
void SetEndian (bool isBig=false)
void SetBigEndian (bool isBig=true)
void SetLittleEndian (bool isBig=false)
void SetPlanarCfg (bool isColorByPlane)
void SetDataType (int dataType)
void SetDataTypeToFloat ()
void SetDataTypeToDouble ()
void SetDataTypeToInt ()
void SetDataTypeToUnsignedInt ()
void SetDataTypeToLong ()
void SetDataTypeToUnsignedLong ()
void SetDataTypeToShort ()
void SetDataTypeToUnsignedShort ()
void SetDataTypeToUnsignedChar ()
void SetDataTypeToChar ()
virtual void PrintSelf (ostream &os)
 mitkRawFilesReader ()
void SetWidth (int w)
void SetHeight (int h)
void SetSpacingX (float px)
void SetSpacingY (float py)
void SetSpacingZ (float pz)
void SetChannelNum (int n)
void SetTitleBytes (int n)
void SetEndian (bool isBig=false)
void SetBigEndian (bool isBig=true)
void SetLittleEndian (bool isBig=false)
void SetPlanarCfg (bool isColorByPlane)
void SetDataType (int dataType)
void SetDataTypeToFloat ()
void SetDataTypeToDouble ()
void SetDataTypeToInt ()
void SetDataTypeToUnsignedInt ()
void SetDataTypeToLong ()
void SetDataTypeToUnsignedLong ()
void SetDataTypeToShort ()
void SetDataTypeToUnsignedShort ()
void SetDataTypeToUnsignedChar ()
void SetDataTypeToChar ()

Detailed Description

mitkRawFilesReader - a concrete reader for reading a series of files contain raw data (no header information).

mitkRawReader reads a a series of raw data files (no any header information) to a volume, each file contains the data of one slice. Because raw file doesn't has any header information, including width, height, image number, spacing information, etc. , you must set enough information using the series of Set* functions. To use this reader, the code snippet is:

    mitkRawReader *aReader = new mitkRawReader; 
    aReader->SetWidth(w); 
    aReader->SetHeight(h); 
    aReader->SetImageNum(d); 
    aReader->SetSpacingX(sx); 
    aReader->SetSpacingY(sy); 
    aReader->SetSpacingZ(sz); 
    aReader->SetDataType(dt); 
    aReader->SetChannelNum(cn); 
    aReader->AddFileName(file1);
    aReader->AddFileName(file2);
    ...  ...  ... 
    //the above is the required information 
    if (aReader->Run())
    { 
        mitkVolume *aVolume = aReader->GetOutput(); 
        Using aVolume
    }


Constructor & Destructor Documentation

mitkRawFilesReader::mitkRawFilesReader  ) 
 

Default constructor.

mitkRawFilesReader::mitkRawFilesReader  ) 
 

Default constructor.


Member Function Documentation

virtual void mitkRawFilesReader::PrintSelf ostream &  os  )  [virtual]
 

Print the necessary information about this object for the debugging purpose.

Parameters:
os The specified ostream to output information.

Reimplemented from mitkVolumeReader.

virtual void mitkRawFilesReader::PrintSelf ostream &  os  )  [virtual]
 

Print the necessary information about this object for the debugging purpose.

Parameters:
os The specified ostream to output information.

Reimplemented from mitkVolumeReader.

void mitkRawFilesReader::SetBigEndian bool  isBig = true  )  [inline]
 

Provided for convenience, just the same as SetEndian().

void mitkRawFilesReader::SetBigEndian bool  isBig = true  )  [inline]
 

Provided for convenience, just the same as SetEndian().

void mitkRawFilesReader::SetChannelNum int  n  )  [inline]
 

Set number of channels.

Parameters:
n number of channel 1---gray image 3---RGB image 4---RGBA image

void mitkRawFilesReader::SetChannelNum int  n  )  [inline]
 

Set number of channels.

Parameters:
n number of channel 1---gray image 3---RGB image 4---RGBA image

void mitkRawFilesReader::SetDataType int  dataType  )  [inline]
 

Set the data type of these images.

Parameters:
dataType the data type of these images, the value should be one of follows:
MITK_CHAR (char)
MITK_UNSIGNED_CHAR (unsigned char)
MITK_SHORT (short)
MITK_UNSIGNED_SHORT (unsigned short)
MITK_INT (int)
MITK_UNSIGNED_INT (unsigned int)
MITK_LONG (long)
MITK_UNSIGNED_LONG (unsigned long)
MITK_FLOAT (float)
MITK_DOUBLE (double)

void mitkRawFilesReader::SetDataType int  dataType  )  [inline]
 

Set the data type of these images.

Parameters:
dataType the data type of these images, the value should be one of follows:
MITK_CHAR (char)
MITK_UNSIGNED_CHAR (unsigned char)
MITK_SHORT (short)
MITK_UNSIGNED_SHORT (unsigned short)
MITK_INT (int)
MITK_UNSIGNED_INT (unsigned int)
MITK_LONG (long)
MITK_UNSIGNED_LONG (unsigned long)
MITK_FLOAT (float)
MITK_DOUBLE (double)

void mitkRawFilesReader::SetDataTypeToChar  )  [inline]
 

Set data type to char.

void mitkRawFilesReader::SetDataTypeToChar  )  [inline]
 

Set data type to char.

void mitkRawFilesReader::SetDataTypeToDouble  )  [inline]
 

Set data type to double.

void mitkRawFilesReader::SetDataTypeToDouble  )  [inline]
 

Set data type to double.

void mitkRawFilesReader::SetDataTypeToFloat  )  [inline]
 

Set data type to float.

void mitkRawFilesReader::SetDataTypeToFloat  )  [inline]
 

Set data type to float.

void mitkRawFilesReader::SetDataTypeToInt  )  [inline]
 

Set data type to int.

void mitkRawFilesReader::SetDataTypeToInt  )  [inline]
 

Set data type to int.

void mitkRawFilesReader::SetDataTypeToLong  )  [inline]
 

Set data type to long.

void mitkRawFilesReader::SetDataTypeToLong  )  [inline]
 

Set data type to long.

void mitkRawFilesReader::SetDataTypeToShort  )  [inline]
 

Set data type to short.

void mitkRawFilesReader::SetDataTypeToShort  )  [inline]
 

Set data type to short.

void mitkRawFilesReader::SetDataTypeToUnsignedChar  )  [inline]
 

Set data type to unsigned char.

void mitkRawFilesReader::SetDataTypeToUnsignedChar  )  [inline]
 

Set data type to unsigned char.

void mitkRawFilesReader::SetDataTypeToUnsignedInt  )  [inline]
 

Set data type to unsigned int.

void mitkRawFilesReader::SetDataTypeToUnsignedInt  )  [inline]
 

Set data type to unsigned int.

void mitkRawFilesReader::SetDataTypeToUnsignedLong  )  [inline]
 

Set data type to unsigned long.

void mitkRawFilesReader::SetDataTypeToUnsignedLong  )  [inline]
 

Set data type to unsigned long.

void mitkRawFilesReader::SetDataTypeToUnsignedShort  )  [inline]
 

Set data type to unsigned short.

void mitkRawFilesReader::SetDataTypeToUnsignedShort  )  [inline]
 

Set data type to unsigned short.

void mitkRawFilesReader::SetEndian bool  isBig = false  )  [inline]
 

Set endian if depth per pixel is bigger than 8.

Parameters:
isBig if the endian configuration is big endian (Mac)

void mitkRawFilesReader::SetEndian bool  isBig = false  )  [inline]
 

Set endian if depth per pixel is bigger than 8.

Parameters:
isBig if the endian configuration is big endian (Mac)

void mitkRawFilesReader::SetHeight int  h  )  [inline]
 

Set image height.

Parameters:
h image height

void mitkRawFilesReader::SetHeight int  h  )  [inline]
 

Set image height.

Parameters:
h image height

void mitkRawFilesReader::SetLittleEndian bool  isBig = false  )  [inline]
 

Provided for convenience, just the same as SetEndian().

void mitkRawFilesReader::SetLittleEndian bool  isBig = false  )  [inline]
 

Provided for convenience, just the same as SetEndian().

void mitkRawFilesReader::SetPlanarCfg bool  isColorByPlane  )  [inline]
 

Set planar configuration.

Parameters:
isColorByPlane if the planar configuration is color-by-plane
Note:
Only used when channel number is bigger than 1. For RGB images, if it is color-by-plane, it's means the pixels should be stored as "R1 R2 R3 ... G1 G2 G3 ... B1 B2 B3 ...", otherwise "R1 G1 B1 R2 G2 B2 ..."

void mitkRawFilesReader::SetPlanarCfg bool  isColorByPlane  )  [inline]
 

Set planar configuration.

Parameters:
isColorByPlane if the planar configuration is color-by-plane
Note:
Only used when channel number is bigger than 1. For RGB images, if it is color-by-plane, it's means the pixels should be stored as "R1 R2 R3 ... G1 G2 G3 ... B1 B2 B3 ...", otherwise "R1 G1 B1 R2 G2 B2 ..."

void mitkRawFilesReader::SetSpacingX float  px  )  [inline]
 

Set spacing information in x axis, the unit is mm.

Parameters:
px the spacing (mm) in two adjacent voxels in x axis.

void mitkRawFilesReader::SetSpacingX float  px  )  [inline]
 

Set spacing information in x axis, the unit is mm.

Parameters:
px the spacing (mm) in two adjacent voxels in x axis.

void mitkRawFilesReader::SetSpacingY float  py  )  [inline]
 

Set spacing information in y axis, the unit is mm.

Parameters:
py the spacing (mm) in two adjacent voxels in y axis.

void mitkRawFilesReader::SetSpacingY float  py  )  [inline]
 

Set spacing information in y axis, the unit is mm.

Parameters:
py the spacing (mm) in two adjacent voxels in y axis.

void mitkRawFilesReader::SetSpacingZ float  pz  )  [inline]
 

Set spacing information in z axis, the unit is mm.

Parameters:
pz the spacing (mm) in two adjacent voxels in z axis.

void mitkRawFilesReader::SetSpacingZ float  pz  )  [inline]
 

Set spacing information in z axis, the unit is mm.

Parameters:
pz the spacing (mm) in two adjacent voxels in z axis.

void mitkRawFilesReader::SetTitleBytes int  n  )  [inline]
 

Set number of bytes in title (header). These bytes will be skipped.

Parameters:
n number of bytes in title (header)
Note:
This title has nothing to do with the image. If the file has a title, the number of bytes must be given so that the program can skip the title properly when reading the file.

void mitkRawFilesReader::SetTitleBytes int  n  )  [inline]
 

Set number of bytes in title (header). These bytes will be skipped.

Parameters:
n number of bytes in title (header)
Note:
This title has nothing to do with the image. If the file has a title, the number of bytes must be given so that the program can skip the title properly when reading the file.

void mitkRawFilesReader::SetWidth int  w  )  [inline]
 

Set image width.

Parameters:
w image width

void mitkRawFilesReader::SetWidth int  w  )  [inline]
 

Set image width.

Parameters:
w image width


The documentation for this class was generated from the following files:
Generated on Tue Feb 25 15:05:25 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3