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]

Writes image data to a single file. More...

#include <itkImageFileWriter.h>

Inheritance diagram for itk::ImageFileWriter< TInputImage >:

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 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 SetFileName (const char *_arg)
virtual const char * GetFileName () const
virtual void SetImageIO (ImageIOBase *_arg)
virtual ImageIOBaseGetImageIO ()
void SetIORegion (const ImageIORegion &region)
virtual ImageIORegion GetIORegion () const

Static Public Member Functions

Pointer New ()

Protected Member Functions

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

Detailed Description

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

Writes image data to a single file.

ImageFileWriter writes its input data to a single output file. ImageFileWriter interfaces with an ImageIO class to write out the data. If you wish to write data into a series of files (e.g., a slice per file) use ImageSeriesWriter.

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. Normally just setting the filename with a suitable suffix (".png", ".jpg", etc) and setting the input to the writer is enough to get the writer to work properly.

See also:
ImageSeriesReader

ImageIOBase

Definition at line 77 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 84 of file itkImageFileWriter.h.

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

Definition at line 96 of file itkImageFileWriter.h.

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

Definition at line 94 of file itkImageFileWriter.h.

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

Definition at line 95 of file itkImageFileWriter.h.

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

Some convenient typedefs. Definition at line 93 of file itkImageFileWriter.h.

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

Reimplemented from itk::ProcessObject.

Definition at line 83 of file itkImageFileWriter.h.

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

Standard class typedefs.

Reimplemented from itk::ProcessObject.

Definition at line 81 of file itkImageFileWriter.h.

Referenced by itk::ImageFileWriter< TInputImage >::Update().

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

Reimplemented from itk::ProcessObject.

Definition at line 82 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>
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 to write.

template<class TInputImage>
virtual ImageIOBase* itk::ImageFileWriter< 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 one can be manually set where the IO factory mechanism may not work (for example, raw image files or image files with non-standard filename suffix's.

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>
virtual ImageIORegion itk::ImageFileWriter< TInputImage >::GetIORegion  )  const [virtual]
 

Specify the region to write. If left NULL, then the whole image is written.

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 to write.

template<class TInputImage>
virtual void itk::ImageFileWriter< 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 one can be manually set where the IO factory mechanism may not work (for example, raw image files or image files with non-standard filename suffix's.

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

Set/Get the image input of this writer.

template<class TInputImage>
void itk::ImageFileWriter< TInputImage >::SetIORegion const ImageIORegion region  ) 
 

Specify the region to write. If left NULL, then the whole image is written.

template<class TInputImage>
virtual void itk::ImageFileWriter< 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 136 of file itkImageFileWriter.h.

References itk::ImageIOBase::Pointer, and itk::ImageFileWriter< TInputImage >::Self.

template<class TInputImage>
virtual void itk::ImageFileWriter< 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.


The documentation for this class was generated from the following file:
Generated at Sun Apr 1 03:14:50 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000