00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00025 #ifndef __vtkImageWriter_h
00026 #define __vtkImageWriter_h
00027
00028 #include "vtkImageAlgorithm.h"
00029
00030 class VTK_IO_EXPORT vtkImageWriter : public vtkImageAlgorithm
00031 {
00032 public:
00033 static vtkImageWriter *New();
00034 vtkTypeRevisionMacro(vtkImageWriter,vtkImageAlgorithm);
00035 void PrintSelf(ostream& os, vtkIndent indent);
00036
00038
00041 vtkSetStringMacro(FileName);
00042 vtkGetStringMacro(FileName);
00044
00046
00049 vtkSetStringMacro(FilePrefix);
00050 vtkGetStringMacro(FilePrefix);
00052
00054
00055 vtkSetStringMacro(FilePattern);
00056 vtkGetStringMacro(FilePattern);
00058
00060
00063 vtkSetMacro(FileDimensionality, int);
00064 vtkGetMacro(FileDimensionality, int);
00066
00067
00069 vtkImageData *GetInput();
00070
00071
00073 virtual void Write();
00074
00075 void DeleteFiles();
00076
00077 protected:
00078 vtkImageWriter();
00079 ~vtkImageWriter();
00080
00081 int FileDimensionality;
00082 char *FilePrefix;
00083 char *FilePattern;
00084 char *FileName;
00085 int FileNumber;
00086 int FileLowerLeft;
00087 char *InternalFileName;
00088
00089 virtual void RecursiveWrite(int dim, vtkImageData *region, ofstream *file);
00090 virtual void RecursiveWrite(int dim, vtkImageData *cache,
00091 vtkImageData *data, ofstream *file);
00092 virtual void WriteFile(ofstream *file, vtkImageData *data, int extent[6]);
00093 virtual void WriteFileHeader(ofstream *, vtkImageData *) {};
00094 virtual void WriteFileTrailer(ofstream *, vtkImageData *) {};
00095
00096
00097
00098 virtual int RequestData(vtkInformation *request,
00099 vtkInformationVector** inputVector,
00100 vtkInformationVector* outputVector);
00101
00102 int MinimumFileNumber;
00103 int MaximumFileNumber;
00104 int FilesDeleted;
00105
00106 private:
00107 vtkImageWriter(const vtkImageWriter&);
00108 void operator=(const vtkImageWriter&);
00109 };
00110
00111 #endif