Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkImageWriter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageWriter.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
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 //BTX
00069   vtkImageData *GetInput();
00070 //ETX
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   // This is called by the superclass.
00097   // This is the method you should override.
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&);  // Not implemented.
00108   void operator=(const vtkImageWriter&);  // Not implemented.
00109 };
00110 
00111 #endif

Generated on Mon Jan 21 23:07:31 2008 for VTK by  doxygen 1.4.3-20050530