Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkMetaImageReader Class Reference

#include <vtkMetaImageReader.h>

Inheritance diagram for vtkMetaImageReader:

Inheritance graph
[legend]
Collaboration diagram for vtkMetaImageReader:

Collaboration graph
[legend]
List of all members.

Detailed Description

read binary UNC meta image data

One of the formats for which a reader is already available in the toolkit is the MetaImage file format. This is a fairly simple yet powerful format consisting of a text header and a binary data section. The following instructions describe how you can write a MetaImage header for the data that you download from the BrainWeb page.

The minimal structure of the MetaImage header is the following:

NDims = 3 DimSize = 181 217 181 ElementType = MET_UCHAR ElementSpacing = 1.0 1.0 1.0 ElementByteOrderMSB = False ElementDataFile = brainweb1.raw

NDims indicate that this is a 3D image. ITK can handle images of arbitrary dimension. DimSize indicates the size of the volume in pixels along each direction. ElementType indicate the primitive type used for pixels. In this case is "unsigned char", implying that the data is digitized in 8 bits / pixel. ElementSpacing indicates the physical separation between the center of one pixel and the center of the next pixel along each direction in space. The units used are millimeters. ElementByteOrderMSB indicates is the data is encoded in little or big endian order. You might want to play with this value when moving data between different computer platforms. ElementDataFile is the name of the file containing the raw binary data of the image. This file must be in the same directory as the header.

MetaImage headers are expected to have extension: ".mha" or ".mhd"

Once you write this header text file, it should be possible to read the image into your ITK based application using the itk::FileIOToImageFilter class.

See also:
vtkImageReader
Created by:
  • Cedilnik, Andy
CVS contributions (if > 5%):
  • Cedilnik, Andy (99%)
CVS logs (CVSweb):
  • .h (/IO/vtkMetaImageReader.h)
  • .cxx (/IO/vtkMetaImageReader.cxx)
Tests:
vtkMetaImageReader (Tests)

Definition at line 79 of file vtkMetaImageReader.h.

Public Types

typedef vtkImageReader Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual int CanReadFile (const char *name)
virtual void SetFileName (const char *fname)
virtual char * GetFileName ()

Static Public Member Functions

int IsTypeOf (const char *type)
vtkMetaImageReaderSafeDownCast (vtkObject *o)
vtkMetaImageReaderNew ()

Protected Member Functions

 vtkMetaImageReader ()
 ~vtkMetaImageReader ()
void ExecuteInformation ()
int GetFileInformation (const char *fname, int populate)
virtual void SetMHDFileName (const char *)

Protected Attributes

char * MHDFileName


Member Typedef Documentation

typedef vtkImageReader vtkMetaImageReader::Superclass
 

Reimplemented from vtkImageReader.

Definition at line 82 of file vtkMetaImageReader.h.


Constructor & Destructor Documentation

vtkMetaImageReader::vtkMetaImageReader  )  [protected]
 

vtkMetaImageReader::~vtkMetaImageReader  )  [protected]
 


Member Function Documentation

virtual const char* vtkMetaImageReader::GetClassName  )  [virtual]
 

Reimplemented from vtkImageReader.

int vtkMetaImageReader::IsTypeOf const char *  type  )  [static]
 

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkImageReader.

virtual int vtkMetaImageReader::IsA const char *  type  )  [virtual]
 

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkImageReader.

vtkMetaImageReader* vtkMetaImageReader::SafeDownCast vtkObject o  )  [static]
 

Reimplemented from vtkImageReader.

void vtkMetaImageReader::PrintSelf ostream &  os,
vtkIndent  indent
[virtual]
 

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkImageReader.

vtkMetaImageReader* vtkMetaImageReader::New  )  [static]
 

Construct object with FlipNormals turned off and Normals set to true.

Reimplemented from vtkImageReader.

virtual void vtkMetaImageReader::SetFileName const char *  fname  )  [virtual]
 

Specify file name of meta file

Reimplemented from vtkImageReader2.

virtual char* vtkMetaImageReader::GetFileName  )  [inline, virtual]
 

Specify file name of meta file

Reimplemented from vtkImageReader2.

Definition at line 91 of file vtkMetaImageReader.h.

virtual int vtkMetaImageReader::CanReadFile const char *  name  )  [virtual]
 

Test whether the file with the given name can be read by this reader.

void vtkMetaImageReader::ExecuteInformation  )  [protected, virtual]
 

Reimplemented from vtkImageReader.

int vtkMetaImageReader::GetFileInformation const char *  fname,
int  populate
[protected]
 

virtual void vtkMetaImageReader::SetMHDFileName const char *   )  [protected, virtual]
 


Member Data Documentation

char* vtkMetaImageReader::MHDFileName [protected]
 

Definition at line 105 of file vtkMetaImageReader.h.


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