ITK  4.1.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
itk::ImageSeriesWriter< TInputImage, TOutputImage > Class Template Reference

#include <itkImageSeriesWriter.h>

+ Inheritance diagram for itk::ImageSeriesWriter< TInputImage, TOutputImage >:
+ Collaboration diagram for itk::ImageSeriesWriter< TInputImage, TOutputImage >:

List of all members.

Public Types

typedef SmartPointer< const SelfConstPointer
typedef const DictionaryArrayTypeDictionaryArrayRawPointer
typedef std::vector
< DictionaryRawPointer
DictionaryArrayType
typedef MetaDataDictionaryDictionaryRawPointer
typedef MetaDataDictionary DictionaryType
typedef std::vector< std::string > FileNamesContainer
typedef InputImageType::RegionType InputImageRegionType
typedef TInputImage InputImageType
typedef OutputImageType::RegionType OutputImageRegionType
typedef TOutputImage OutputImageType
typedef SmartPointer< SelfPointer
typedef ImageSeriesWriter Self
typedef ProcessObject Superclass
typedef ImageFileWriter
< TOutputImage > 
WriterType

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
const FileNamesContainerGetFileNames () const
const InputImageTypeGetInput (void)
const InputImageTypeGetInput (unsigned int idx)
virtual const char * GetNameOfClass () const
void SetInput (const InputImageType *input)
virtual void SetMetaDataDictionaryArray (DictionaryArrayRawPointer _arg)
virtual void Update ()
virtual void Write (void)
virtual void SetImageIO (ImageIOBase *_arg)
virtual ImageIOBaseGetImageIO ()
virtual void SetStartIndex (SizeValueType _arg)
virtual SizeValueType GetStartIndex () const
virtual void SetIncrementIndex (SizeValueType _arg)
virtual SizeValueType GetIncrementIndex () const
virtual void SetSeriesFormat (const char *_arg)
virtual const char * GetSeriesFormat () const
void SetFileNames (const FileNamesContainer &name)
void SetFileName (std::string const &name)
void AddFileName (std::string const &name)

Static Public Member Functions

static Pointer New ()

Protected Member Functions

void GenerateData (void)
void GenerateNumericFileNamesAndWrite (void)

Protected Attributes

ImageIOBase::Pointer m_ImageIO
bool m_UserSpecifiedImageIO

Private Member Functions

void GenerateNumericFileNames (void)
 ImageSeriesWriter (const Self &)
void operator= (const Self &)
void WriteFiles ()

Private Attributes

FileNamesContainer m_FileNames
SizeValueType m_IncrementIndex
DictionaryArrayRawPointer m_MetaDataDictionaryArray
std::string m_SeriesFormat
SizeValueType m_StartIndex
bool m_UseCompression
virtual void SetUseCompression (bool _arg)
virtual const bool & GetUseCompression ()
virtual void UseCompressionOn ()
virtual void UseCompressionOff ()
 ImageSeriesWriter ()
 ~ImageSeriesWriter ()
void PrintSelf (std::ostream &os, Indent indent) const

Detailed Description

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

Writes image data to a series of data files.

ImageSeriesWriter writes its input data to a series of output files. The writer is templated over an input image type and an output image type. Usually, the output image type will have fewer dimensions than the input image type. Each file has a name created using the SeriesFormat. This string is used as a sprintf argument to build a filename. The string should contain zero or one "%d" or equivalent. The "%d" is an incremental file number that starts at StartIndex and is incremented by IncrementIndex. Since this writer uses an internal instance of an ImageFileWriter, the type of file is determined by either the file extension or an ImageIO class if specified.

See also:
ImageFileWriter
ImageIOBase
ImageSeriesReader

Definition at line 79 of file itkImageSeriesWriter.h.


Member Typedef Documentation

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

Reimplemented from itk::ProcessObject.

Definition at line 86 of file itkImageSeriesWriter.h.

template<class TInputImage , class TOutputImage >
typedef const DictionaryArrayType* itk::ImageSeriesWriter< TInputImage, TOutputImage >::DictionaryArrayRawPointer

Definition at line 106 of file itkImageSeriesWriter.h.

template<class TInputImage , class TOutputImage >
typedef std::vector< DictionaryRawPointer > itk::ImageSeriesWriter< TInputImage, TOutputImage >::DictionaryArrayType

Definition at line 105 of file itkImageSeriesWriter.h.

template<class TInputImage , class TOutputImage >
typedef MetaDataDictionary* itk::ImageSeriesWriter< TInputImage, TOutputImage >::DictionaryRawPointer

Definition at line 104 of file itkImageSeriesWriter.h.

template<class TInputImage , class TOutputImage >
typedef MetaDataDictionary itk::ImageSeriesWriter< TInputImage, TOutputImage >::DictionaryType

The pixel type of the output image.

Definition at line 103 of file itkImageSeriesWriter.h.

template<class TInputImage , class TOutputImage >
typedef std::vector< std::string > itk::ImageSeriesWriter< TInputImage, TOutputImage >::FileNamesContainer

Definition at line 100 of file itkImageSeriesWriter.h.

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

Definition at line 96 of file itkImageSeriesWriter.h.

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

Some convenient typedefs.

Definition at line 92 of file itkImageSeriesWriter.h.

template<class TInputImage , class TOutputImage >
typedef OutputImageType::RegionType itk::ImageSeriesWriter< TInputImage, TOutputImage >::OutputImageRegionType

Definition at line 98 of file itkImageSeriesWriter.h.

template<class TInputImage , class TOutputImage >
typedef TOutputImage itk::ImageSeriesWriter< TInputImage, TOutputImage >::OutputImageType

Definition at line 97 of file itkImageSeriesWriter.h.

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

Reimplemented from itk::ProcessObject.

Definition at line 85 of file itkImageSeriesWriter.h.

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

Standard class typedefs.

Reimplemented from itk::ProcessObject.

Definition at line 83 of file itkImageSeriesWriter.h.

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

Reimplemented from itk::ProcessObject.

Definition at line 84 of file itkImageSeriesWriter.h.

template<class TInputImage , class TOutputImage >
typedef ImageFileWriter< TOutputImage > itk::ImageSeriesWriter< TInputImage, TOutputImage >::WriterType

Definition at line 99 of file itkImageSeriesWriter.h.


Constructor & Destructor Documentation

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

Set the compression On or Off

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

Set the compression On or Off

template<class TInputImage , class TOutputImage >
itk::ImageSeriesWriter< TInputImage, TOutputImage >::ImageSeriesWriter ( const Self ) [private]

Member Function Documentation

template<class TInputImage , class TOutputImage >
void itk::ImageSeriesWriter< TInputImage, TOutputImage >::AddFileName ( std::string const &  name) [inline]

Add a single filename to the list of files. To add a vector of filenames, use the AddFileNames method.

Definition at line 188 of file itkImageSeriesWriter.h.

template<class TInputImage , class TOutputImage >
virtual::itk::LightObject::Pointer itk::ImageSeriesWriter< TInputImage, TOutputImage >::CreateAnother ( void  ) const [virtual]

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

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

Does the real work.

Reimplemented from itk::ProcessObject.

template<class TInputImage , class TOutputImage >
void itk::ImageSeriesWriter< TInputImage, TOutputImage >::GenerateNumericFileNames ( void  ) [private]
template<class TInputImage , class TOutputImage >
void itk::ImageSeriesWriter< TInputImage, TOutputImage >::GenerateNumericFileNamesAndWrite ( void  ) [protected]

Transition method used for DEPRECATING old functionality. This method should be removed after release ITK 1.8

template<class TInputImage , class TOutputImage >
const FileNamesContainer& itk::ImageSeriesWriter< TInputImage, TOutputImage >::GetFileNames ( ) const [inline]

Definition at line 171 of file itkImageSeriesWriter.h.

template<class TInputImage , class TOutputImage >
virtual ImageIOBase* itk::ImageSeriesWriter< TInputImage, TOutputImage >::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 , class TOutputImage >
virtual SizeValueType itk::ImageSeriesWriter< TInputImage, TOutputImage >::GetIncrementIndex ( ) const [virtual]

Set the increment of the index of the series. The default value is 1.

template<class TInputImage , class TOutputImage >
const InputImageType* itk::ImageSeriesWriter< TInputImage, TOutputImage >::GetInput ( void  )
template<class TInputImage , class TOutputImage >
const InputImageType* itk::ImageSeriesWriter< TInputImage, TOutputImage >::GetInput ( unsigned int  idx)
template<class TInputImage , class TOutputImage >
virtual const char* itk::ImageSeriesWriter< TInputImage, TOutputImage >::GetNameOfClass ( ) const [virtual]

Run-time type information (and related methods).

Reimplemented from itk::ProcessObject.

template<class TInputImage , class TOutputImage >
virtual const char* itk::ImageSeriesWriter< TInputImage, TOutputImage >::GetSeriesFormat ( ) const [virtual]

The format string used to generate each filename in the series. The filename is built with sprintf(filename, SeriesFormat, number) where number starts at StartIndex and is incremented by IncrementIndex.

template<class TInputImage , class TOutputImage >
virtual SizeValueType itk::ImageSeriesWriter< TInputImage, TOutputImage >::GetStartIndex ( ) const [virtual]

Use this method to set the starting index of the series. The default value is 1.

template<class TInputImage , class TOutputImage >
virtual const bool& itk::ImageSeriesWriter< TInputImage, TOutputImage >::GetUseCompression ( ) [virtual]

Set the compression On or Off

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

Method for creation through the object factory.

Reimplemented from itk::Object.

template<class TInputImage , class TOutputImage >
void itk::ImageSeriesWriter< TInputImage, TOutputImage >::operator= ( const Self ) [private]

Time when GenerateOutputInformation was last called.

Reimplemented from itk::ProcessObject.

template<class TInputImage , class TOutputImage >
void itk::ImageSeriesWriter< TInputImage, TOutputImage >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const [protected, virtual]

Set the compression On or Off

Reimplemented from itk::ProcessObject.

template<class TInputImage , class TOutputImage >
void itk::ImageSeriesWriter< TInputImage, TOutputImage >::SetFileName ( std::string const &  name) [inline]

Set the first file name to be processed. This deletes previous filenames.

Definition at line 178 of file itkImageSeriesWriter.h.

template<class TInputImage , class TOutputImage >
void itk::ImageSeriesWriter< TInputImage, TOutputImage >::SetFileNames ( const FileNamesContainer name) [inline]

Set/Get the vector of strings that contains the file names. Files are processed in sequential order.

Definition at line 161 of file itkImageSeriesWriter.h.

template<class TInputImage , class TOutputImage >
virtual void itk::ImageSeriesWriter< TInputImage, TOutputImage >::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 , class TOutputImage >
virtual void itk::ImageSeriesWriter< TInputImage, TOutputImage >::SetIncrementIndex ( SizeValueType  _arg) [virtual]

Set the increment of the index of the series. The default value is 1.

template<class TInputImage , class TOutputImage >
void itk::ImageSeriesWriter< TInputImage, TOutputImage >::SetInput ( const InputImageType input)
template<class TInputImage , class TOutputImage >
virtual void itk::ImageSeriesWriter< TInputImage, TOutputImage >::SetMetaDataDictionaryArray ( DictionaryArrayRawPointer  _arg) [virtual]

Set the array of MetaDataDictionaries this is an optinal entry, mostly intended to be used when writing DICOM slices.

template<class TInputImage , class TOutputImage >
virtual void itk::ImageSeriesWriter< TInputImage, TOutputImage >::SetSeriesFormat ( const char *  _arg) [virtual]

The format string used to generate each filename in the series. The filename is built with sprintf(filename, SeriesFormat, number) where number starts at StartIndex and is incremented by IncrementIndex.

template<class TInputImage , class TOutputImage >
virtual void itk::ImageSeriesWriter< TInputImage, TOutputImage >::SetStartIndex ( SizeValueType  _arg) [virtual]

Use this method to set the starting index of the series. The default value is 1.

template<class TInputImage , class TOutputImage >
virtual void itk::ImageSeriesWriter< TInputImage, TOutputImage >::SetUseCompression ( bool  _arg) [virtual]

Set the compression On or Off

template<class TInputImage , class TOutputImage >
virtual void itk::ImageSeriesWriter< TInputImage, TOutputImage >::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 134 of file itkImageSeriesWriter.h.

template<class TInputImage , class TOutputImage >
virtual void itk::ImageSeriesWriter< TInputImage, TOutputImage >::UseCompressionOff ( ) [virtual]

Set the compression On or Off

template<class TInputImage , class TOutputImage >
virtual void itk::ImageSeriesWriter< TInputImage, TOutputImage >::UseCompressionOn ( ) [virtual]

Set the compression On or Off

template<class TInputImage , class TOutputImage >
virtual void itk::ImageSeriesWriter< TInputImage, TOutputImage >::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. The whole image is written.

template<class TInputImage , class TOutputImage >
void itk::ImageSeriesWriter< TInputImage, TOutputImage >::WriteFiles ( ) [private]

Member Data Documentation

template<class TInputImage , class TOutputImage >
FileNamesContainer itk::ImageSeriesWriter< TInputImage, TOutputImage >::m_FileNames [private]

A list of filenames to be processed.

Definition at line 225 of file itkImageSeriesWriter.h.

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

Definition at line 216 of file itkImageSeriesWriter.h.

template<class TInputImage , class TOutputImage >
SizeValueType itk::ImageSeriesWriter< TInputImage, TOutputImage >::m_IncrementIndex [private]

Definition at line 234 of file itkImageSeriesWriter.h.

template<class TInputImage , class TOutputImage >
DictionaryArrayRawPointer itk::ImageSeriesWriter< TInputImage, TOutputImage >::m_MetaDataDictionaryArray [private]

Array of MetaDataDictionary used for passing information to each slice

Definition at line 239 of file itkImageSeriesWriter.h.

template<class TInputImage , class TOutputImage >
std::string itk::ImageSeriesWriter< TInputImage, TOutputImage >::m_SeriesFormat [private]

These variables are used for generating filenames using a numeric approach This functionality is being DEPRECATED since it belongs to a NumericSeriesFileNames class. Removing this functionality from here allows to use additional SeriesFileNames such as the DICOM filenames generators.

Definition at line 232 of file itkImageSeriesWriter.h.

template<class TInputImage , class TOutputImage >
SizeValueType itk::ImageSeriesWriter< TInputImage, TOutputImage >::m_StartIndex [private]

Definition at line 233 of file itkImageSeriesWriter.h.

template<class TInputImage , class TOutputImage >
bool itk::ImageSeriesWriter< TInputImage, TOutputImage >::m_UseCompression [private]

Definition at line 236 of file itkImageSeriesWriter.h.

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

Definition at line 219 of file itkImageSeriesWriter.h.


The documentation for this class was generated from the following file: