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

mitkBMPReader Class Reference

mitkBMPReader - a concrete reader for reading BMP image files More...

#include <mitkBMPReader.h>

Inherits mitkVolumeReader.

Inheritance diagram for mitkBMPReader:

Inheritance graph
[legend]
Collaboration diagram for mitkBMPReader:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void PrintSelf (ostream &os)
void SetSpacingX (float px)
void SetSpacingY (float py)
void SetSpacingZ (float pz)
void SetSpacings (float s[3])

Detailed Description

mitkBMPReader - a concrete reader for reading BMP image files

mitkBMPReader reads a set of BMP image files to a volume. Because BMP file doesn't have the spacing information, you must set them using the SetSpacingX, SetSpacingY, SetSpacingZ functions. To use this reader, the code snippet is:

    mitkBMPReader *aReader = new mitkBMPReader; 
    aReader->SetSpacingX(sx); 
    aReader->SetSpacingY(sy); 
    aReader->SetSpacingZ(sz); 
    aReader->AddFileName(file1);
    aReader->AddFileName(file2);
    ...  ...  ... 
    if (aReader->Run())
    { 
        mitkVolume *aVolume = aReader->GetOutput(); 
        Using aVolume
    }
Warning:
All of the images must have equal width and height. Otherwise they can't form a volume. Now MITK only supports 8 bits and 24 bits BMP files.


Member Function Documentation

virtual void mitkBMPReader::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 mitkBMPReader::SetSpacings float  s[3]  )  [inline]
 

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

Parameters:
px the spacing (mm) in two adjacent voxels in x axis.
py the spacing (mm) in two adjacent voxels in y axis.
pz the spacing (mm) in two adjacent voxels in z axis.

void mitkBMPReader::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 mitkBMPReader::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 mitkBMPReader::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.


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