VTK
|
Writes images to files. More...
#include <vtkImageWriter.h>
Public Types | |
typedef vtkImageAlgorithm | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkImageWriter * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | Write () |
void | DeleteFiles () |
virtual void | SetFileName (const char *) |
virtual char * | GetFileName () |
virtual void | SetFilePrefix (const char *) |
virtual char * | GetFilePrefix () |
virtual void | SetFilePattern (const char *) |
virtual char * | GetFilePattern () |
virtual void | SetFileDimensionality (int) |
virtual int | GetFileDimensionality () |
vtkImageData * | GetInput () |
Static Public Member Functions | |
static vtkImageWriter * | New () |
static int | IsTypeOf (const char *type) |
static vtkImageWriter * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkImageWriter () | |
~vtkImageWriter () | |
virtual void | RecursiveWrite (int dim, vtkImageData *region, vtkInformation *inInfo, ofstream *file) |
virtual void | RecursiveWrite (int dim, vtkImageData *cache, vtkImageData *data, vtkInformation *inInfo, ofstream *file) |
virtual void | WriteFile (ofstream *file, vtkImageData *data, int extent[6], int wExtent[6]) |
virtual void | WriteFileHeader (ofstream *, vtkImageData *, int[6]) |
virtual void | WriteFileTrailer (ofstream *, vtkImageData *) |
virtual int | RequestData (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) |
Protected Attributes | |
int | FileDimensionality |
char * | FilePrefix |
char * | FilePattern |
char * | FileName |
int | FileNumber |
int | FileLowerLeft |
char * | InternalFileName |
int | MinimumFileNumber |
int | MaximumFileNumber |
int | FilesDeleted |
Writes images to files.
vtkImageWriter writes images to files with any data type. The data type of the file is the same scalar type as the input. The dimensionality determines whether the data will be written in one or multiple files. This class is used as the superclass of most image writing classes such as vtkBMPWriter etc. It supports streaming.
Definition at line 31 of file vtkImageWriter.h.
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkMINCImageWriter, vtkMetaImageWriter, vtkPNGWriter, vtkJPEGWriter, vtkTIFFWriter, vtkPImageWriter, vtkBMPWriter, vtkPostScriptWriter, and vtkPNMWriter.
Definition at line 35 of file vtkImageWriter.h.
vtkImageWriter::vtkImageWriter | ( | ) | [protected] |
vtkImageWriter::~vtkImageWriter | ( | ) | [protected] |
static vtkImageWriter* vtkImageWriter::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkAlgorithm.
Reimplemented in vtkMINCImageWriter, vtkMetaImageWriter, vtkPNGWriter, vtkJPEGWriter, vtkTIFFWriter, vtkPImageWriter, vtkBMPWriter, vtkPostScriptWriter, and vtkPNMWriter.
static int vtkImageWriter::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkMINCImageWriter, vtkMetaImageWriter, vtkPNGWriter, vtkJPEGWriter, vtkTIFFWriter, vtkPImageWriter, vtkBMPWriter, vtkPostScriptWriter, and vtkPNMWriter.
virtual int vtkImageWriter::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkMINCImageWriter, vtkMetaImageWriter, vtkPNGWriter, vtkJPEGWriter, vtkTIFFWriter, vtkPImageWriter, vtkBMPWriter, vtkPostScriptWriter, and vtkPNMWriter.
static vtkImageWriter* vtkImageWriter::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkMINCImageWriter, vtkMetaImageWriter, vtkPNGWriter, vtkJPEGWriter, vtkTIFFWriter, vtkPImageWriter, vtkBMPWriter, vtkPostScriptWriter, and vtkPNMWriter.
virtual vtkObjectBase* vtkImageWriter::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkMINCImageWriter, vtkMetaImageWriter, vtkPNGWriter, vtkJPEGWriter, vtkTIFFWriter, vtkPImageWriter, vtkBMPWriter, vtkPostScriptWriter, and vtkPNMWriter.
vtkImageWriter* vtkImageWriter::NewInstance | ( | ) | const |
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkMINCImageWriter, vtkMetaImageWriter, vtkPNGWriter, vtkJPEGWriter, vtkTIFFWriter, vtkPImageWriter, vtkBMPWriter, vtkPostScriptWriter, and vtkPNMWriter.
void vtkImageWriter::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [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 vtkImageAlgorithm.
Reimplemented in vtkMINCImageWriter, vtkMetaImageWriter, vtkPNGWriter, vtkJPEGWriter, vtkTIFFWriter, vtkPImageWriter, vtkBMPWriter, vtkPostScriptWriter, and vtkPNMWriter.
virtual void vtkImageWriter::SetFileName | ( | const char * | ) | [virtual] |
Specify file name for the image file. You should specify either a FileName or a FilePrefix. Use FilePrefix if the data is stored in multiple files.
Reimplemented in vtkMINCImageWriter, and vtkMetaImageWriter.
virtual char* vtkImageWriter::GetFileName | ( | ) | [virtual] |
Specify file name for the image file. You should specify either a FileName or a FilePrefix. Use FilePrefix if the data is stored in multiple files.
Reimplemented in vtkMetaImageWriter.
virtual void vtkImageWriter::SetFilePrefix | ( | const char * | ) | [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.
virtual char* vtkImageWriter::GetFilePrefix | ( | ) | [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.
virtual void vtkImageWriter::SetFilePattern | ( | const char * | ) | [virtual] |
The sprintf format used to build filename from FilePrefix and number.
virtual char* vtkImageWriter::GetFilePattern | ( | ) | [virtual] |
The sprintf format used to build filename from FilePrefix and number.
virtual void vtkImageWriter::SetFileDimensionality | ( | int | ) | [virtual] |
What dimension are the files to be written. Usually this is 2, or 3. If it is 2 and the input is a volume then the volume will be written as a series of 2d slices.
virtual int vtkImageWriter::GetFileDimensionality | ( | ) | [virtual] |
What dimension are the files to be written. Usually this is 2, or 3. If it is 2 and the input is a volume then the volume will be written as a series of 2d slices.
Set/Get the input object from the image pipeline.
Reimplemented from vtkImageAlgorithm.
virtual void vtkImageWriter::Write | ( | ) | [virtual] |
The main interface which triggers the writer to start.
Reimplemented in vtkMINCImageWriter, vtkMetaImageWriter, vtkPNGWriter, and vtkJPEGWriter.
void vtkImageWriter::DeleteFiles | ( | ) |
virtual void vtkImageWriter::RecursiveWrite | ( | int | dim, |
vtkImageData * | region, | ||
vtkInformation * | inInfo, | ||
ofstream * | file | ||
) | [protected, virtual] |
Reimplemented in vtkPImageWriter.
virtual void vtkImageWriter::RecursiveWrite | ( | int | dim, |
vtkImageData * | cache, | ||
vtkImageData * | data, | ||
vtkInformation * | inInfo, | ||
ofstream * | file | ||
) | [protected, virtual] |
Reimplemented in vtkPImageWriter.
virtual void vtkImageWriter::WriteFile | ( | ofstream * | file, |
vtkImageData * | data, | ||
int | extent[6], | ||
int | wExtent[6] | ||
) | [protected, virtual] |
Reimplemented in vtkTIFFWriter, vtkBMPWriter, vtkPostScriptWriter, and vtkPNMWriter.
virtual void vtkImageWriter::WriteFileHeader | ( | ofstream * | , |
vtkImageData * | , | ||
int | [6] | ||
) | [inline, protected, virtual] |
Reimplemented in vtkTIFFWriter, vtkBMPWriter, vtkPostScriptWriter, and vtkPNMWriter.
Definition at line 103 of file vtkImageWriter.h.
virtual void vtkImageWriter::WriteFileTrailer | ( | ofstream * | , |
vtkImageData * | |||
) | [inline, protected, virtual] |
Reimplemented in vtkTIFFWriter, and vtkPostScriptWriter.
Definition at line 104 of file vtkImageWriter.h.
virtual int vtkImageWriter::RequestData | ( | vtkInformation * | request, |
vtkInformationVector ** | inputVector, | ||
vtkInformationVector * | outputVector | ||
) | [protected, virtual] |
This is called in response to a REQUEST_DATA request from the executive. Subclasses should override either this method or the ExecuteDataWithInformation method in order to generate data for their outputs. For images, the output arrays will already be allocated, so all that is necessary is to fill in the voxel values.
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkMINCImageWriter.
int vtkImageWriter::FileDimensionality [protected] |
Definition at line 84 of file vtkImageWriter.h.
char* vtkImageWriter::FilePrefix [protected] |
Definition at line 85 of file vtkImageWriter.h.
char* vtkImageWriter::FilePattern [protected] |
Definition at line 86 of file vtkImageWriter.h.
char* vtkImageWriter::FileName [protected] |
Definition at line 87 of file vtkImageWriter.h.
int vtkImageWriter::FileNumber [protected] |
Definition at line 88 of file vtkImageWriter.h.
int vtkImageWriter::FileLowerLeft [protected] |
Definition at line 89 of file vtkImageWriter.h.
char* vtkImageWriter::InternalFileName [protected] |
Definition at line 90 of file vtkImageWriter.h.
int vtkImageWriter::MinimumFileNumber [protected] |
Definition at line 112 of file vtkImageWriter.h.
int vtkImageWriter::MaximumFileNumber [protected] |
Definition at line 113 of file vtkImageWriter.h.
int vtkImageWriter::FilesDeleted [protected] |
Definition at line 114 of file vtkImageWriter.h.