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

itk::ImageFileReader< TOutputImage, ConvertPixelTraits > Class Template Reference

Data source that reads image data from disk files. More...

#include <itkImageFileReader.h>

Inheritance diagram for itk::ImageFileReader:

Inheritance graph
[legend]
Collaboration diagram for itk::ImageFileReader< TOutputImage, ConvertPixelTraits >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ImageFileReader Self
typedef ImageSource< TOutputImage > Superclass
typedef SmartPointer< SelfPointer
typedef TOutputImage::SizeType SizeType
typedef TOutputImage::RegionType ImageRegionType
typedef TOutputImage::PixelType OutputImagePixelType

Public Methods

virtual const char * GetClassName () const
virtual void GenerateOutputInformation (void)
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 SetImageIO (ImageIOBase *_arg)
virtual ImageIOBaseGetImageIO ()

Static Public Methods

Pointer New ()

Protected Methods

 ImageFileReader ()
 ~ImageFileReader ()
void PrintSelf (std::ostream &os, Indent indent) const
void DoConvertBuffer (void *buffer, unsigned long numberOfPixels)
virtual void GenerateData ()

Protected Attributes

ImageIOBase::Pointer m_ImageIO
bool m_UserSpecified
std::string m_FileName
std::string m_FilePrefix
std::string m_FilePattern

Detailed Description

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
class itk::ImageFileReader< TOutputImage, ConvertPixelTraits >

Data source that reads image data from disk files.

This source object is a general filter to read data from a variety of file formats. It works with a ImageIOBase subclass to actually do the reading of the data. Object factory machinery can be used to automatically create the ImageIOBase, or the ImageIOBase can be manually created and set.

TOutputImage is the type expected by the external users of the filter. If data stored in the file is stored in a different format then specified by TOutputImage, than this filter converts data between the file type and the external expected type. The ConvertTraits template argument is used to do the conversion.

A Pluggable factory pattern is used this allows different kinds of readers to be registered (even at run time) without having to modify the code in this class.

Definition at line 77 of file itkImageFileReader.h.


Member Typedef Documentation

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
typedef TOutputImage::RegionType itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::ImageRegionType
 

The region of the output image.

Definition at line 95 of file itkImageFileReader.h.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
typedef TOutputImage::PixelType itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::OutputImagePixelType
 

The pixel type of the output image.

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 98 of file itkImageFileReader.h.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
typedef SmartPointer<Self> itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::Pointer
 

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 83 of file itkImageFileReader.h.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
typedef ImageFileReader itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::Self
 

Standard class typedefs.

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 81 of file itkImageFileReader.h.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
typedef TOutputImage::SizeType itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::SizeType
 

The size of the output image.

Definition at line 92 of file itkImageFileReader.h.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
typedef ImageSource<TOutputImage> itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::Superclass
 

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 82 of file itkImageFileReader.h.


Constructor & Destructor Documentation

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::ImageFileReader   [protected]
 

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::~ImageFileReader   [protected]
 


Member Function Documentation

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
void itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::DoConvertBuffer void *    buffer,
unsigned long    numberOfPixels
[protected]
 

Convert a block of pixels from one type to another.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
virtual void itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::GenerateData   [protected, virtual]
 

Does the real work.

Reimplemented from itk::ImageSource< TOutputImage >.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
virtual void itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::GenerateOutputInformation void    [virtual]
 

Prepare the allocation of the output image during the first back propagation of the pipeline

Reimplemented from itk::ProcessObject.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
virtual const char* itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::GetClassName   const [virtual]
 

Run-time type information (and related methods).

Reimplemented from itk::ImageSource< TOutputImage >.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
virtual const char* itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::GetFileName   const [virtual]
 

Specify the file to load. This is forwarded to the IO instance. Either the FileName or FilePrefix plus pattern are used to read files.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
virtual const char* itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::GetFilePattern   const [virtual]
 

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

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
virtual const char* itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::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.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
virtual ImageIOBase* itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::GetImageIO   [virtual]
 

Set/Get the ImageIO helper class. Often this is created via the object factory mechanism that determines whether a particular ImageIO can read a certain file. This method provides a way to get the ImageIO instance that is created.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
Pointer itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::New   [static]
 

Method for creation through the object factory.

Reimplemented from itk::ImageSource< TOutputImage >.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
void itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::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.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
virtual void itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::SetFileName const char *    _arg [virtual]
 

Specify the file to load. This is forwarded to the IO instance. Either the FileName or FilePrefix plus pattern are used to read files.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
virtual void itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::SetFilePattern const char *    _arg [virtual]
 

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

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
virtual void itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::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.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
virtual void itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::SetImageIO ImageIOBase   _arg [virtual]
 

Set/Get the ImageIO helper class. Often this is created via the object factory mechanism that determines whether a particular ImageIO can read a certain file. This method provides a way to get the ImageIO instance that is created.


Member Data Documentation

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
std::string itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::m_FileName [protected]
 

Definition at line 145 of file itkImageFileReader.h.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
std::string itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::m_FilePattern [protected]
 

Definition at line 147 of file itkImageFileReader.h.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
std::string itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::m_FilePrefix [protected]
 

Definition at line 146 of file itkImageFileReader.h.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
ImageIOBase::Pointer itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::m_ImageIO [protected]
 

Definition at line 142 of file itkImageFileReader.h.

template<class TOutputImage, class ConvertPixelTraits = DefaultConvertPixelTraits< typename TOutputImage::PixelType>>
bool itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::m_UserSpecified [protected]
 

Definition at line 143 of file itkImageFileReader.h.


The documentation for this class was generated from the following file:
Generated at Wed Mar 12 01:14:28 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000