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 vtkTypeMacro(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
00070 vtkImageData *GetInput();
00071
00073
00075 virtual void Write();
00076
00077 void DeleteFiles();
00078
00079 protected:
00080 vtkImageWriter();
00081 ~vtkImageWriter();
00082
00083 int FileDimensionality;
00084 char *FilePrefix;
00085 char *FilePattern;
00086 char *FileName;
00087 int FileNumber;
00088 int FileLowerLeft;
00089 char *InternalFileName;
00090
00091 virtual void RecursiveWrite(int dim, vtkImageData *region, ofstream *file);
00092 virtual void RecursiveWrite(int dim, vtkImageData *cache,
00093 vtkImageData *data, ofstream *file);
00094 virtual void WriteFile(ofstream *file, vtkImageData *data, int extent[6]);
00095 virtual void WriteFileHeader(ofstream *, vtkImageData *) {};
00096 virtual void WriteFileTrailer(ofstream *, vtkImageData *) {};
00097
00098
00099
00100 virtual int RequestData(vtkInformation *request,
00101 vtkInformationVector** inputVector,
00102 vtkInformationVector* outputVector);
00103
00104 int MinimumFileNumber;
00105 int MaximumFileNumber;
00106 int FilesDeleted;
00107
00108 private:
00109 vtkImageWriter(const vtkImageWriter&);
00110 void operator=(const vtkImageWriter&);
00111 };
00112
00113 #endif