VTK
vtkImageWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageWriter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
25 #ifndef vtkImageWriter_h
26 #define vtkImageWriter_h
27 
28 #include "vtkIOImageModule.h" // For export macro
29 #include "vtkImageAlgorithm.h"
30 
32 {
33 public:
34  static vtkImageWriter *New();
36  void PrintSelf(ostream& os, vtkIndent indent);
37 
39 
42  vtkSetStringMacro(FileName);
43  vtkGetStringMacro(FileName);
45 
47 
50  vtkSetStringMacro(FilePrefix);
51  vtkGetStringMacro(FilePrefix);
53 
55 
56  vtkSetStringMacro(FilePattern);
57  vtkGetStringMacro(FilePattern);
59 
61 
64  vtkSetMacro(FileDimensionality, int);
65  vtkGetMacro(FileDimensionality, int);
67 
68 //BTX
70 
72 //ETX
74 
76  virtual void Write();
77 
78  void DeleteFiles();
79 
80 protected:
82  ~vtkImageWriter();
83 
85  char *FilePrefix;
86  char *FilePattern;
87  char *FileName;
91 
92  virtual void RecursiveWrite(int dim,
93  vtkImageData *region,
94  vtkInformation*inInfo,
95  ofstream *file);
96  virtual void RecursiveWrite(int dim,
97  vtkImageData *cache,
99  vtkInformation* inInfo,
100  ofstream *file);
101  virtual void WriteFile(ofstream *file, vtkImageData *data,
102  int extent[6], int wExtent[6]);
103  virtual void WriteFileHeader(ofstream *, vtkImageData *, int [6]) {}
104  virtual void WriteFileTrailer(ofstream *, vtkImageData *) {}
105 
106  // This is called by the superclass.
107  // This is the method you should override.
108  virtual int RequestData(vtkInformation *request,
109  vtkInformationVector** inputVector,
110  vtkInformationVector* outputVector);
111 
115 
116 private:
117  vtkImageWriter(const vtkImageWriter&); // Not implemented.
118  void operator=(const vtkImageWriter&); // Not implemented.
119 };
120 
121 #endif
virtual void WriteFileTrailer(ofstream *, vtkImageData *)
Store vtkAlgorithm input/output information.
vtkDataObject * GetInput()
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
Writes images to files.
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent)
static vtkAlgorithm * New()
#define VTKIOIMAGE_EXPORT
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
char * InternalFileName
virtual void WriteFileHeader(ofstream *, vtkImageData *, int[6])