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 "vtkImageAlgorithm.h"
29 
31 {
32 public:
33  static vtkImageWriter *New();
35  void PrintSelf(ostream& os, vtkIndent indent);
36 
38 
41  vtkSetStringMacro(FileName);
42  vtkGetStringMacro(FileName);
44 
46 
49  vtkSetStringMacro(FilePrefix);
50  vtkGetStringMacro(FilePrefix);
52 
54 
55  vtkSetStringMacro(FilePattern);
56  vtkGetStringMacro(FilePattern);
58 
60 
63  vtkSetMacro(FileDimensionality, int);
64  vtkGetMacro(FileDimensionality, int);
66 
67 //BTX
69 
71 //ETX
73 
75  virtual void Write();
76 
77  void DeleteFiles();
78 
79 protected:
81  ~vtkImageWriter();
82 
84  char *FilePrefix;
85  char *FilePattern;
86  char *FileName;
90 
91  virtual void RecursiveWrite(int dim, vtkImageData *region, ofstream *file);
92  virtual void RecursiveWrite(int dim, vtkImageData *cache,
93  vtkImageData *data, ofstream *file);
94  virtual void WriteFile(ofstream *file, vtkImageData *data, int extent[6]);
95  virtual void WriteFileHeader(ofstream *, vtkImageData *) {};
96  virtual void WriteFileTrailer(ofstream *, vtkImageData *) {};
97 
98  // This is called by the superclass.
99  // This is the method you should override.
100  virtual int RequestData(vtkInformation *request,
101  vtkInformationVector** inputVector,
102  vtkInformationVector* outputVector);
103 
107 
108 private:
109  vtkImageWriter(const vtkImageWriter&); // Not implemented.
110  void operator=(const vtkImageWriter&); // Not implemented.
111 };
112 
113 #endif
virtual void WriteFileTrailer(ofstream *, vtkImageData *)
Store vtkAlgorithm input/output information.
vtkDataObject * GetInput()
a simple class to control print indentation
Definition: vtkIndent.h:37
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
Writes images to files.
virtual void WriteFileHeader(ofstream *, vtkImageData *)
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent)
static vtkAlgorithm * New()
#define VTK_IO_EXPORT
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
char * InternalFileName