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

mitkRawReader Class Reference

mitkRawReader - a concrete reader for reading raw volume file(no header information). More...

#include <mitkRawReader.h>

Inherits mitkVolumeReader.

Inheritance diagram for mitkRawReader:

Inheritance graph
Collaboration diagram for mitkRawReader:

Collaboration graph
List of all members.

Public Member Functions

virtual void PrintSelf (ostream &os)
 mitkRawReader ()
void SetWidth (int w)
void SetHeight (int h)
void SetImageNum (int n)
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

mitkRawReader - a concrete reader for reading raw volume file(no header information).

mitkRawReader reads a raw volume file(no any header information) to a volume. 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 SetXXX functions. To use this reader, the code snippet is:

    mitkRawReader *aReader = new mitkRawReader; 
    aReader->AddFileName(filename); //Only require one file name 
    //the above is the required information 
    if (aReader->Run())
        mitkVolume *aVolume = aReader->GetOutput(); 
        Using aVolume

Constructor & Destructor Documentation

mitkRawReader::mitkRawReader  ) 

Default constructor.

Member Function Documentation

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

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

os The specified ostream to output information.

Reimplemented from mitkVolumeReader.

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

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

void mitkRawReader::SetChannelNum int  n  )  [inline]

Set number of channel.

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

void mitkRawReader::SetDataType int  dataType  )  [inline]

Set the data type of these images.

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 mitkRawReader::SetDataTypeToChar  )  [inline]

Set data type to char.

void mitkRawReader::SetDataTypeToDouble  )  [inline]

Set data type to double.

void mitkRawReader::SetDataTypeToFloat  )  [inline]

Set data type to float.

void mitkRawReader::SetDataTypeToInt  )  [inline]

Set data type to int.

void mitkRawReader::SetDataTypeToLong  )  [inline]

Set data type to long.

void mitkRawReader::SetDataTypeToShort  )  [inline]

Set data type to short.

void mitkRawReader::SetDataTypeToUnsignedChar  )  [inline]

Set data type to unsigned char.

void mitkRawReader::SetDataTypeToUnsignedInt  )  [inline]

Set data type to unsigned int.

void mitkRawReader::SetDataTypeToUnsignedLong  )  [inline]

Set data type to unsigned long.

void mitkRawReader::SetDataTypeToUnsignedShort  )  [inline]

Set data type to unsigned short.

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

Set endian if depth per pixel is bigger than 8.

isBig if the endian configuration is big endian (Mac)

void mitkRawReader::SetHeight int  h  )  [inline]

Set image height.

h image height

void mitkRawReader::SetImageNum int  n  )  [inline]

Set number of images.

n image number

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

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

void mitkRawReader::SetPlanarCfg bool  isColorByPlane  )  [inline]

Set planar configuration.

isColorByPlane if the planar configuration is color-by-plane
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 mitkRawReader::SetSpacingX float  px  )  [inline]

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

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

void mitkRawReader::SetSpacingY float  py  )  [inline]

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

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

void mitkRawReader::SetSpacingZ float  pz  )  [inline]

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

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

void mitkRawReader::SetTitleBytes int  n  )  [inline]

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

n number of bytes in title (header)
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 mitkRawReader::SetWidth int  w  )  [inline]

Set image width.

w image width

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