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

itk::ImageSeriesWriter< TInputImage > Class Template Reference
[Input and Output Filters]

Writes image data to a series of data files. More...

#include <itkImageSeriesWriter.h>

Inheritance diagram for itk::ImageSeriesWriter< TInputImage >:

Inheritance graph
[legend]
Collaboration diagram for itk::ImageSeriesWriter< TInputImage >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ImageSeriesWriter Self
typedef ProcessObject Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
typedef TInputImage InputImageType
typedef InputImageType::Pointer InputImagePointer
typedef InputImageType::RegionType InputImageRegionType
typedef InputImageType::PixelType InputImagePixelType

Public Member Functions

virtual const char * GetClassName () const
virtual void Write (void)
virtual void Update ()
void SetInput (const InputImageType *input)
const InputImageTypeGetInput (void)
const InputImageTypeGetInput (unsigned int idx)
virtual void SetFileIterator (FileIteratorBase *_arg)
virtual FileIteratorBaseGetFileIterator ()
virtual void SetImageIO (ImageIOBase *_arg)
virtual ImageIOBaseGetImageIO ()

Static Public Member Functions

Pointer New ()

Protected Member Functions

 ImageSeriesWriter ()
 ~ImageSeriesWriter ()
void PrintSelf (std::ostream &os, Indent indent) const
void GenerateData (void)
void SetIORegion (const ImageIORegion &region)
const ImageIORegionGetIORegion () const

Protected Attributes

FileIteratorBase::Pointer m_FileIterator
ImageIOBase::Pointer m_ImageIO
bool m_UserSpecifiedImageIO
ImageIORegion m_IORegion
bool m_UserSpecifiedIORegion

Detailed Description

template<class TInputImage>
class itk::ImageSeriesWriter< TInputImage >

Writes image data to a series of data files.

ImageSeriesWriter writes its input data to a series of output files. ImageSeriesWriter interfaces with the classes ImageIOBase and FileIteratorBase to write out the data. If you wish to write data into a single file, ImageFileWriter is easier to use.

A pluggable factory pattern is used that allows different file formats to be written (even at run time) without having to modify the code in this class. You can either manually instantiate the ImageIO object and associate it with the ImageSeriesWriter, or create a FileIteratorBase subclass and set the SeriesFormat with a suitable suffix (".png", ".jpg", etc). Of course the input to the to the writer must be set as well.

Note: the name of the output files is controlled by a subclass of FileIteratorBase. If an ImageIO is set, it will produce a file iterator. However, the FileIterator can be manually set to control how the files are named. If an ImageIO is not set, but a file iterator is set, then the appropriate ImageIO (if possible) is determined from the SeriesFormat ivar of the FileIterator.

See also:
ImageFileWriter

ImageIOBase

FileIteratorBase

ImageSeriesReader

Definition at line 87 of file itkImageSeriesWriter.h.


Member Typedef Documentation

template<class TInputImage>
typedef SmartPointer<const Self> itk::ImageSeriesWriter< TInputImage >::ConstPointer
 

Reimplemented from itk::ProcessObject.

Definition at line 94 of file itkImageSeriesWriter.h.

template<class TInputImage>
typedef InputImageType::PixelType itk::ImageSeriesWriter< TInputImage >::InputImagePixelType
 

Definition at line 106 of file itkImageSeriesWriter.h.

template<class TInputImage>
typedef InputImageType::Pointer itk::ImageSeriesWriter< TInputImage >::InputImagePointer
 

Definition at line 104 of file itkImageSeriesWriter.h.

template<class TInputImage>
typedef InputImageType::RegionType itk::ImageSeriesWriter< TInputImage >::InputImageRegionType
 

Definition at line 105 of file itkImageSeriesWriter.h.

template<class TInputImage>
typedef TInputImage itk::ImageSeriesWriter< TInputImage >::InputImageType
 

Some convenient typedefs. Definition at line 103 of file itkImageSeriesWriter.h.

template<class TInputImage>
typedef SmartPointer<Self> itk::ImageSeriesWriter< TInputImage >::Pointer
 

Reimplemented from itk::ProcessObject.

Definition at line 93 of file itkImageSeriesWriter.h.

template<class TInputImage>
typedef ImageSeriesWriter itk::ImageSeriesWriter< TInputImage >::Self
 

Standard class typedefs.

Reimplemented from itk::ProcessObject.

Definition at line 91 of file itkImageSeriesWriter.h.

template<class TInputImage>
typedef ProcessObject itk::ImageSeriesWriter< TInputImage >::Superclass
 

Reimplemented from itk::ProcessObject.

Definition at line 92 of file itkImageSeriesWriter.h.


Constructor & Destructor Documentation

template<class TInputImage>
itk::ImageSeriesWriter< TInputImage >::ImageSeriesWriter  )  [protected]
 

template<class TInputImage>
itk::ImageSeriesWriter< TInputImage >::~ImageSeriesWriter  )  [protected]
 


Member Function Documentation

template<class TInputImage>
void itk::ImageSeriesWriter< TInputImage >::GenerateData void   )  [protected, virtual]
 

Does the real work.

Reimplemented from itk::ProcessObject.

template<class TInputImage>
virtual const char* itk::ImageSeriesWriter< TInputImage >::GetClassName  )  const [virtual]
 

Run-time type information (and related methods).

Reimplemented from itk::ProcessObject.

template<class TInputImage>
virtual FileIteratorBase* itk::ImageSeriesWriter< TInputImage >::GetFileIterator  )  [virtual]
 

The naming of the output files is controlled by using a subclass of FileIteratorBase (e.g., NumericSeriesFileIterator).

template<class TInputImage>
virtual ImageIOBase* itk::ImageSeriesWriter< TInputImage >::GetImageIO  )  [virtual]
 

Set/Get the ImageIO helper class. Usually this is created via the object factory mechanism that determines whether a particular ImageIO can write a certain file. This method provides a way to get the ImageIO instance that is created, or to manually set one when the factory mechanism may not work (e.g., for raw files or for non-standard file suffix).

template<class TInputImage>
const InputImageType* itk::ImageSeriesWriter< TInputImage >::GetInput unsigned int  idx  ) 
 

Set/Get the image input of this writer.

Reimplemented from itk::ProcessObject.

template<class TInputImage>
const InputImageType* itk::ImageSeriesWriter< TInputImage >::GetInput void   ) 
 

Set/Get the image input of this writer.

template<class TInputImage>
const ImageIORegion& itk::ImageSeriesWriter< TInputImage >::GetIORegion  )  const [protected]
 

Specify the region to write. If left NULL, then the whole image is written. (Left protected for now to insure that the user doesn't try to use writing of partial images just yet since it's really not working at this time.)

template<class TInputImage>
Pointer itk::ImageSeriesWriter< TInputImage >::New  )  [static]
 

Method for creation through the object factory.

Reimplemented from itk::Object.

template<class TInputImage>
void itk::ImageSeriesWriter< TInputImage >::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 TInputImage>
virtual void itk::ImageSeriesWriter< TInputImage >::SetFileIterator FileIteratorBase _arg  )  [virtual]
 

The naming of the output files is controlled by using a subclass of FileIteratorBase (e.g., NumericSeriesFileIterator).

template<class TInputImage>
virtual void itk::ImageSeriesWriter< TInputImage >::SetImageIO ImageIOBase _arg  )  [virtual]
 

Set/Get the ImageIO helper class. Usually this is created via the object factory mechanism that determines whether a particular ImageIO can write a certain file. This method provides a way to get the ImageIO instance that is created, or to manually set one when the factory mechanism may not work (e.g., for raw files or for non-standard file suffix).

template<class TInputImage>
void itk::ImageSeriesWriter< TInputImage >::SetInput const InputImageType input  ) 
 

Set/Get the image input of this writer.

template<class TInputImage>
void itk::ImageSeriesWriter< TInputImage >::SetIORegion const ImageIORegion region  )  [protected]
 

Specify the region to write. If left NULL, then the whole image is written. (Left protected for now to insure that the user doesn't try to use writing of partial images just yet since it's really not working at this time.)

template<class TInputImage>
virtual void itk::ImageSeriesWriter< TInputImage >::Update void   )  [inline, virtual]
 

Aliased to the Write() method to be consistent with the rest of the pipeline.

Reimplemented from itk::ProcessObject.

Definition at line 141 of file itkImageSeriesWriter.h.

References itk::ImageIOBase::Pointer, and itk::FileIteratorBase::Pointer.

template<class TInputImage>
virtual void itk::ImageSeriesWriter< TInputImage >::Write void   )  [virtual]
 

A special version of the Update() method for writers. It invokes start and end events and handles releasing data. It eventually calls GenerateData() which does the actual writing. Note: the write method will write data specified by the IORegion. If not set, then then the whole image is written. Note that the region will be cropped to fit the input image's LargestPossibleRegion.


Member Data Documentation

template<class TInputImage>
FileIteratorBase::Pointer itk::ImageSeriesWriter< TInputImage >::m_FileIterator [protected]
 

Used to produce the names of the output files in the series Definition at line 153 of file itkImageSeriesWriter.h.

template<class TInputImage>
ImageIOBase::Pointer itk::ImageSeriesWriter< TInputImage >::m_ImageIO [protected]
 

Definition at line 155 of file itkImageSeriesWriter.h.

template<class TInputImage>
ImageIORegion itk::ImageSeriesWriter< TInputImage >::m_IORegion [protected]
 

Definition at line 158 of file itkImageSeriesWriter.h.

template<class TInputImage>
bool itk::ImageSeriesWriter< TInputImage >::m_UserSpecifiedImageIO [protected]
 

Definition at line 156 of file itkImageSeriesWriter.h.

template<class TInputImage>
bool itk::ImageSeriesWriter< TInputImage >::m_UserSpecifiedIORegion [protected]
 

Definition at line 159 of file itkImageSeriesWriter.h.


The documentation for this class was generated from the following file:
Generated at Sat Mar 31 03:02:17 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000