VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkWriter.h 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 =========================================================================*/ 00033 #ifndef __vtkWriter_h 00034 #define __vtkWriter_h 00035 00036 #include "vtkIOCoreModule.h" // For export macro 00037 #include "vtkAlgorithm.h" 00038 00039 class vtkDataObject; 00040 00041 #define VTK_ASCII 1 00042 #define VTK_BINARY 2 00043 00044 class VTKIOCORE_EXPORT vtkWriter : public vtkAlgorithm 00045 { 00046 public: 00047 vtkTypeMacro(vtkWriter,vtkAlgorithm); 00048 void PrintSelf(ostream& os, vtkIndent indent); 00049 00053 virtual int Write(); 00054 00059 void EncodeString(char* resname, const char* name, bool doublePercent); 00060 00066 void EncodeWriteString(ostream* out, const char* name, bool doublePercent); 00067 00069 00070 void SetInputData(vtkDataObject *input); 00071 void SetInputData(int index, vtkDataObject *input); 00072 //BTX 00073 vtkDataObject *GetInput(); 00074 vtkDataObject *GetInput(int port); 00075 //ETX 00077 00078 protected: 00079 vtkWriter(); 00080 ~vtkWriter(); 00081 00082 virtual int ProcessRequest(vtkInformation *request, 00083 vtkInformationVector **inputVector, 00084 vtkInformationVector *outputVector); 00085 virtual int RequestData(vtkInformation *request, 00086 vtkInformationVector **inputVector, 00087 vtkInformationVector *outputVector); 00088 00089 virtual void WriteData() = 0; //internal method subclasses must respond to 00090 vtkTimeStamp WriteTime; 00091 private: 00092 vtkWriter(const vtkWriter&); // Not implemented. 00093 void operator=(const vtkWriter&); // Not implemented. 00094 }; 00095 00096 #endif