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

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

The base class for all image data writers. More...

#include <itkImageFileWriter.h>

Inheritance diagram for itk::ImageFileWriter:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef ImageFileWriter 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 Methods

virtual const char * GetClassName () const
virtual void Update ()
void SetInput (const InputImageType *input)
const InputImageTypeGetInput (void)
const InputImageTypeGetInput (unsigned int idx)
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 ()
virtual void Write ()
virtual void Write (const ImageIORegion &region)

Static Public Methods

Pointer New ()

Protected Methods

 ImageFileWriter ()
 ~ImageFileWriter ()
void PrintSelf (std::ostream &os, Indent indent) const
void GenerateOutputInformation (void)
void GenerateData (void)

Detailed Description

template<class TInputImage>
class itk::ImageFileWriter< TInputImage >

The base class for all image data writers.

ImageFileWriter is the base class for all Insight image data writers. ImageFileWriter interfaces with an ImageIO class to write out its data.

A Pluggable factory pattern is used that allows different kinds of writers to be registered (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 ImageFileWriter, or let the class figure it out from the extension.

Definition at line 71 of file itkImageFileWriter.h.


Member Typedef Documentation

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

Reimplemented from itk::ProcessObject.

Definition at line 78 of file itkImageFileWriter.h.

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

Definition at line 90 of file itkImageFileWriter.h.

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

Definition at line 88 of file itkImageFileWriter.h.

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

Definition at line 89 of file itkImageFileWriter.h.

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

Some convenient typedefs.

Definition at line 87 of file itkImageFileWriter.h.

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

Reimplemented from itk::ProcessObject.

Definition at line 77 of file itkImageFileWriter.h.

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

Standard class typedefs.

Reimplemented from itk::ProcessObject.

Definition at line 75 of file itkImageFileWriter.h.

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

Reimplemented from itk::ProcessObject.

Definition at line 76 of file itkImageFileWriter.h.


Constructor & Destructor Documentation

template<class TInputImage>
itk::ImageFileWriter< TInputImage >::ImageFileWriter   [protected]
 

template<class TInputImage>
itk::ImageFileWriter< TInputImage >::~ImageFileWriter   [protected]
 


Member Function Documentation

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

Does the real work.

Reimplemented from itk::ProcessObject.

template<class TInputImage>
void itk::ImageFileWriter< TInputImage >::GenerateOutputInformation void    [protected, virtual]
 

Generate the information decribing the output data. The default implementation of this method will copy information from the input to the output. A filter may override this method if its output will have different information than its input. For instance, a filter that shrinks an image will need to provide an implementation for this method that changes the spacing of the pixels. Such filters should call their superclass' implementation of this method prior to changing the information values they need (i.e. GenerateOutputInformation() should call Superclass::GenerateOutputInformation() prior to changing the information.

Reimplemented from itk::ProcessObject.

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

Run-time type information (and related methods).

Reimplemented from itk::ProcessObject.

template<class TInputImage>
virtual const char* itk::ImageFileWriter< TInputImage >::GetFileName   const [virtual]
 

Specify the name of the output file.

template<class TInputImage>
virtual const char* itk::ImageFileWriter< TInputImage >::GetFilePattern   const [virtual]
 

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

template<class TInputImage>
virtual const char* itk::ImageFileWriter< TInputImage >::GetFilePrefix   const [virtual]
 

Specify file prefix for the image file(s). You should specify either a FileName or FilePrefix. Use FilePrefix if the data can be stored in multiple files.

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

Set/Get the ImageIO helper class. Often 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.

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

Set/Get the image input of this writer.

Reimplemented from itk::ProcessObject.

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

Set/Get the image input of this writer.

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

Method for creation through the object factory.

Reimplemented from itk::Object.

template<class TInputImage>
void itk::ImageFileWriter< 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::ImageFileWriter< TInputImage >::SetFileName const char *    _arg [virtual]
 

Specify the name of the output file.

template<class TInputImage>
virtual void itk::ImageFileWriter< TInputImage >::SetFilePattern const char *    _arg [virtual]
 

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

template<class TInputImage>
virtual void itk::ImageFileWriter< TInputImage >::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 can be stored in multiple files.

template<class TInputImage>
virtual void itk::ImageFileWriter< TInputImage >::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 write a certain file. This method provides a way to get the ImageIO instance that is created.

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

Set/Get the image input of this writer.

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

Aliased to Write() method.

Reimplemented from itk::ProcessObject.

Definition at line 136 of file itkImageFileWriter.h.

References HardConnectedComponentImageFilter::GenerateData().

template<class TInputImage>
virtual void itk::ImageFileWriter< TInputImage >::Write const ImageIORegion   region [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: if the write method is called without arguments, then the entire image is written. The Write(region) method writes the specified region (if the ImageIO supports it). Note that the region will be cropped to fit the input image's LargestPossibleRegion.

template<class TInputImage>
virtual void itk::ImageFileWriter< TInputImage >::Write   [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: if the write method is called without arguments, then the entire image is written. The Write(region) method writes the specified region (if the ImageIO supports it). Note that the region will be cropped to fit the input image's LargestPossibleRegion.


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