VTK
vtkWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkWriter.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 =========================================================================*/
33 #ifndef vtkWriter_h
34 #define vtkWriter_h
35 
36 #include "vtkIOCoreModule.h" // For export macro
37 #include "vtkAlgorithm.h"
38 
39 class vtkDataObject;
40 
41 #define VTK_ASCII 1
42 #define VTK_BINARY 2
43 
45 {
46 public:
47  vtkTypeMacro(vtkWriter,vtkAlgorithm);
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
53  virtual int Write();
54 
59  void EncodeString(char* resname, const char* name, bool doublePercent);
60 
66  void EncodeWriteString(ostream* out, const char* name, bool doublePercent);
67 
69 
70  void SetInputData(vtkDataObject *input);
71  void SetInputData(int index, vtkDataObject *input);
72 //BTX
73  vtkDataObject *GetInput();
74  vtkDataObject *GetInput(int port);
75 //ETX
77 
78 protected:
79  vtkWriter();
80  ~vtkWriter();
81 
82  virtual int ProcessRequest(vtkInformation *request,
83  vtkInformationVector **inputVector,
84  vtkInformationVector *outputVector);
85  virtual int RequestData(vtkInformation *request,
86  vtkInformationVector **inputVector,
87  vtkInformationVector *outputVector);
88 
89  virtual void WriteData() = 0; //internal method subclasses must respond to
91 private:
92  vtkWriter(const vtkWriter&); // Not implemented.
93  void operator=(const vtkWriter&); // Not implemented.
94 };
95 
96 #endif
Store vtkAlgorithm input/output information.
record modification and/or execution time
Definition: vtkTimeStamp.h:34
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
#define VTKIOCORE_EXPORT
abstract class to write data to file(s)
Definition: vtkWriter.h:44
vtkTimeStamp WriteTime
Definition: vtkWriter.h:90
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:61
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:64
void PrintSelf(ostream &os, vtkIndent indent)