Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::ImageIO Class Reference

#include <itkImageIO.h>

Inheritance diagram for itk::ImageIO:

Inheritance graph
[legend]
Collaboration diagram for itk::ImageIO:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ImageIO Self
typedef SmartPointer< SelfPointer
typedef ProcessObject Superclass
typedef std::deque< std::string > FileExtensionsListType
enum  ByteOrder { LittleEndian, BigEndian }

Public Methods

virtual const char * GetClassName () const
virtual void ReadHeader (const std::string fileName="")=0
virtual const double * GetOrigin () const=0
virtual const double * GetSpacing () const=0
virtual FileExtensionsListTypeGetSupportedFileExtensions () const=0
void * GetFileData ()
virtual unsigned int GetDimensions (unsigned int i) const
virtual unsigned int GetPixelStride () const
virtual void SetFileName (const char *_arg)
virtual const char * GetFileName () const
virtual void SetFilePrefix (const char *_arg)
virtual const char * GetFilePrefix () const
virtual void SetFilePattern (const char *_arg)
virtual const char * GetFilePattern () const
virtual void SetNumberOfComponents (unsigned int _arg)
virtual unsigned int GetNumberOfComponents () const
virtual void SetNumberOfDimensions (unsigned int _arg)
virtual unsigned int GetNumberOfDimensions ()
virtual void SetPixelType (AtomicPixelType _arg)
virtual AtomicPixelType GetPixelType ()

Protected Methods

 ImageIO ()
 ~ImageIO ()
void PrintSelf (std::ostream &os, Indent indent) const
virtual void Reset (const bool freeDynamic=true)
void Resize (const unsigned int numDimensions, const unsigned int *dimensions)
void ComputeStrides ()
unsigned int ImageSizeInPixels () const
unsigned int ImageSizeInComponents () const
unsigned int ImageSizeInBytes () const
unsigned int GetComponentStride () const
unsigned int GetRowStride () const
unsigned int GetSliceStride () const

Protected Attributes

bool m_Initialized
std::string m_FileName
std::string m_FilePrefix
std::string m_FilePattern
AtomicPixelType m_PixelType
unsigned int m_NumberOfComponents
unsigned int m_NumberOfDimensions
unsigned int m_Dimensions [ITK_MAX_DIMENSIONS]
unsigned int m_Strides [ITK_MAX_DIMENSIONS]
void * m_FileData

Member Typedef Documentation

typedef std::deque<std::string> itk::ImageIO::FileExtensionsListType
 

The type of list for file extensions.

Definition at line 54 of file itkImageIO.h.

typedef SmartPointer<Self> itk::ImageIO::Pointer
 

Reimplemented from itk::ProcessObject.

Definition at line 37 of file itkImageIO.h.

typedef ImageIO itk::ImageIO::Self
 

Standard class typedefs.

Reimplemented from itk::ProcessObject.

Definition at line 36 of file itkImageIO.h.

typedef ProcessObject itk::ImageIO::Superclass
 

Reimplemented from itk::ProcessObject.

Definition at line 38 of file itkImageIO.h.


Member Enumeration Documentation

enum itk::ImageIO::ByteOrder
 

Convenient enum for specifyin byte order.

Enumeration values:
LittleEndian 
BigEndian 

Definition at line 110 of file itkImageIO.h.


Constructor & Destructor Documentation

itk::ImageIO::ImageIO   [protected]
 

itk::ImageIO::~ImageIO   [protected]
 


Member Function Documentation

void itk::ImageIO::ComputeStrides   [protected]
 

Calculates the different strides (distance from one thing to the next). Upon return, strides[0] = bytes to get to the next component of a pixel, strides[1] = bytes to get to the next pixel in x direction, strides[2] = bytes to get to the next row in y direction, strides[3] = bytes to get to the next slice in z direction, etc.

virtual const char* itk::ImageIO::GetClassName   const [virtual]
 

Run-time type information (and related methods).

Reimplemented from itk::ProcessObject.

unsigned int itk::ImageIO::GetComponentStride   const [protected]
 

Convenient method for accessing number of bytes to get to the next pixel component. Returns m_Strides[0].

virtual unsigned int itk::ImageIO::GetDimensions unsigned int    i const [virtual]
 

Return and set the size in x, y, z, etc. dimensions.

void* itk::ImageIO::GetFileData  
 

The guts of this class. Returns FileData, which holds the raw pixels of the image read from disk.

virtual const char* itk::ImageIO::GetFileName   const [virtual]
 

Set the filename.

virtual const char* itk::ImageIO::GetFilePattern   const [virtual]
 

The sprintf format used to build filename from FilePrefix and number.

virtual const char* itk::ImageIO::GetFilePrefix   const [virtual]
 

Specify file prefix for the image file(s). You should specify either a FileName or FilePrefix. Use FilePrefix if the data is stored in multiple files. (Note: the FileName ivar is available from the superclass.)

virtual unsigned int itk::ImageIO::GetNumberOfComponents   const [virtual]
 

Set the number of components per pixel in the image. This may be set by the reading process.

virtual unsigned int itk::ImageIO::GetNumberOfDimensions   [virtual]
 

Set the number of independent variables (dimensions) in the image being read.

virtual const double* itk::ImageIO::GetOrigin   const [pure virtual]
 

Get the image origin.

virtual unsigned int itk::ImageIO::GetPixelStride   const [virtual]
 

Convenient method for accessing the number of bytes to get to the next pixel. Returns m_Strides[1];

virtual AtomicPixelType itk::ImageIO::GetPixelType   [virtual]
 

Set/Get the type of the pixel. Often this is set during the read operation and does not always need to be set.

unsigned int itk::ImageIO::GetRowStride   const [protected]
 

Convenient method for accessing the number of bytes to get to the next row. Returns m_Strides[2].

unsigned int itk::ImageIO::GetSliceStride   const [protected]
 

Convenient method for accessing the number of bytes to get to the next slice. Returns m_Strides[3].

virtual const double* itk::ImageIO::GetSpacing   const [pure virtual]
 

Get the image spacing.

virtual FileExtensionsListType& itk::ImageIO::GetSupportedFileExtensions   const [pure virtual]
 

Returns the file extension that a particular ImageIO subclass is capable of handling (e.g. .jpg, .mhd, etc.) Currently only a single string is returned, but can be modified so that a whole list of strings is returned.

unsigned int itk::ImageIO::ImageSizeInBytes   const [protected]
 

Return the number of bytes in the image.

unsigned int itk::ImageIO::ImageSizeInComponents   const [protected]
 

Return the number of pixels times the number of components in the image.

unsigned int itk::ImageIO::ImageSizeInPixels   const [protected]
 

Return the number of pixels in the image.

void itk::ImageIO::PrintSelf std::ostream &    os,
Indent    indent
const [protected, 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 itk::ProcessObject.

virtual void itk::ImageIO::ReadHeader const std::string    fileName = "" [pure virtual]
 

Read a file's header to determine image dimensions, etc. fileName is file to read from. default="", which uses m_FileName instead

virtual void itk::ImageIO::Reset const bool    freeDynamic = true [protected, virtual]
 

Return the object to an initialized state, ready to be used

void itk::ImageIO::Resize const unsigned int    numDimensions,
const unsigned int *    dimensions
[protected]
 

Resize the ImageIO object to new dimensions.

virtual void itk::ImageIO::SetFileName const char *    _arg [virtual]
 

Set the filename.

virtual void itk::ImageIO::SetFilePattern const char *    _arg [virtual]
 

The sprintf format used to build filename from FilePrefix and number.

virtual void itk::ImageIO::SetFilePrefix const char *    _arg [virtual]
 

Specify file prefix for the image file(s). You should specify either a FileName or FilePrefix. Use FilePrefix if the data is stored in multiple files. (Note: the FileName ivar is available from the superclass.)

virtual void itk::ImageIO::SetNumberOfComponents unsigned int    _arg [virtual]
 

Set the number of components per pixel in the image. This may be set by the reading process.

virtual void itk::ImageIO::SetNumberOfDimensions unsigned int    _arg [virtual]
 

Set the number of independent variables (dimensions) in the image being read.

virtual void itk::ImageIO::SetPixelType AtomicPixelType    _arg [virtual]
 

Set/Get the type of the pixel. Often this is set during the read operation and does not always need to be set.


Member Data Documentation

unsigned int itk::ImageIO::m_Dimensions[ITK_MAX_DIMENSIONS] [protected]
 

The array which stores the number of pixels in the x, y, z directions.

Definition at line 136 of file itkImageIO.h.

void* itk::ImageIO::m_FileData [protected]
 

Stores the raw pixels of the image

Definition at line 143 of file itkImageIO.h.

std::string itk::ImageIO::m_FileName [protected]
 

Filename: pathname + filename + file extension.

Definition at line 121 of file itkImageIO.h.

std::string itk::ImageIO::m_FilePattern [protected]
 

Definition at line 123 of file itkImageIO.h.

std::string itk::ImageIO::m_FilePrefix [protected]
 

Definition at line 122 of file itkImageIO.h.

bool itk::ImageIO::m_Initialized [protected]
 

Does the ImageIO object have enough info to be of use?

Definition at line 118 of file itkImageIO.h.

unsigned int itk::ImageIO::m_NumberOfComponents [protected]
 

Stores the number of components per pixel. This will be 1 for grayscale images, 3 for RGBPixel images, and 4 for RGBPixelA images.

Definition at line 130 of file itkImageIO.h.

unsigned int itk::ImageIO::m_NumberOfDimensions [protected]
 

The number of dimensions in the image.

Definition at line 133 of file itkImageIO.h.

AtomicPixelType itk::ImageIO::m_PixelType [protected]
 

Type of the pixel.

Definition at line 126 of file itkImageIO.h.

unsigned int itk::ImageIO::m_Strides[ITK_MAX_DIMENSIONS] [protected]
 

Stores the number of bytes it takes to get to the next 'thing' e.g. component, pixel, row, slice, etc.

Definition at line 140 of file itkImageIO.h.


The documentation for this class was generated from the following file:
Generated at Fri May 21 01:28:15 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000