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=========================================================================*/
26#ifndef vtkImageWriter_h
27#define vtkImageWriter_h
28
29#include "vtkIOImageModule.h" // For export macro
30#include "vtkImageAlgorithm.h"
31
32class VTKIOIMAGE_EXPORT vtkImageWriter : public vtkImageAlgorithm
33{
34public:
37 void PrintSelf(ostream& os, vtkIndent indent);
38
40
45 vtkSetStringMacro(FileName);
48
50
55 vtkSetStringMacro(FilePrefix);
56 vtkGetStringMacro(FilePrefix);
58
60
63 vtkSetStringMacro(FilePattern);
64 vtkGetStringMacro(FilePattern);
66
68
73 vtkSetMacro(FileDimensionality, int);
74 vtkGetMacro(FileDimensionality, int);
76
81
85 virtual void Write();
86
88
89protected:
92
96 char *FileName;
100
101 virtual void RecursiveWrite(int dim,
102 vtkImageData *region,
103 vtkInformation*inInfo,
104 ofstream *file);
105 virtual void RecursiveWrite(int dim,
106 vtkImageData *cache,
108 vtkInformation* inInfo,
109 ofstream *file);
110 virtual void WriteFile(ofstream *file, vtkImageData *data,
111 int extent[6], int wExtent[6]);
112 virtual void WriteFileHeader(ofstream *, vtkImageData *, int [6]) {}
113 virtual void WriteFileTrailer(ofstream *, vtkImageData *) {}
114
115 // This is called by the superclass.
116 // This is the method you should override.
117 virtual int RequestData(vtkInformation *request,
118 vtkInformationVector** inputVector,
119 vtkInformationVector* outputVector);
120
124
125private:
126 vtkImageWriter(const vtkImageWriter&) VTK_DELETE_FUNCTION;
127 void operator=(const vtkImageWriter&) VTK_DELETE_FUNCTION;
128};
129
130#endif
Generic algorithm superclass for image algs.
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
Writes images to files.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
char * InternalFileName
virtual void RecursiveWrite(int dim, vtkImageData *region, vtkInformation *inInfo, ofstream *file)
virtual void WriteFile(ofstream *file, vtkImageData *data, int extent[6], int wExtent[6])
virtual void RecursiveWrite(int dim, vtkImageData *cache, vtkImageData *data, vtkInformation *inInfo, ofstream *file)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void Write()
The main interface which triggers the writer to start.
vtkImageData * GetInput()
Set/Get the input object from the image pipeline.
void DeleteFiles()
virtual void WriteFileTrailer(ofstream *, vtkImageData *)
static vtkImageWriter * New()
virtual void WriteFileHeader(ofstream *, vtkImageData *, int[6])
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
@ extent
Definition: vtkX3D.h:345
@ data
Definition: vtkX3D.h:315
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.