VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkDataObjectWriter.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 =========================================================================*/ 00032 #ifndef __vtkDataObjectWriter_h 00033 #define __vtkDataObjectWriter_h 00034 00035 #include "vtkWriter.h" 00036 #include "vtkDataWriter.h" // Needs data because it calls methods on it 00037 #include "vtkStdString.h" // For string used in api 00038 00039 class VTK_IO_EXPORT vtkDataObjectWriter : public vtkWriter 00040 { 00041 public: 00042 static vtkDataObjectWriter *New(); 00043 vtkTypeMacro(vtkDataObjectWriter,vtkWriter); 00044 void PrintSelf(ostream& os, vtkIndent indent); 00045 00047 00048 void SetFileName(const char *filename) {this->Writer->SetFileName(filename);}; 00049 char *GetFileName() {return this->Writer->GetFileName();}; 00050 void SetHeader(const char *header) {this->Writer->SetHeader(header);}; 00051 char *GetHeader() {return this->Writer->GetHeader();}; 00052 void SetFileType(int type) {this->Writer->SetFileType(type);}; 00053 int GetFileType() {return this->Writer->GetFileType();}; 00054 void SetFileTypeToASCII() {this->Writer->SetFileType(VTK_ASCII);}; 00055 void SetFileTypeToBinary() {this->Writer->SetFileType(VTK_BINARY);}; 00056 void SetWriteToOutputString(int b) {this->Writer->SetWriteToOutputString(b);}; 00057 void WriteToOutputStringOn() {this->Writer->WriteToOutputStringOn();}; 00058 void WriteToOutputStringOff() {this->Writer->WriteToOutputStringOff();}; 00059 int GetWriteToOutputString() {return this->Writer->GetWriteToOutputString();}; 00060 char* GetOutputString() {return this->Writer->GetOutputString();}; 00061 vtkStdString GetOutputStdString() {return this->Writer->GetOutputStdString();}; 00062 int GetOutputStringLength() {return this->Writer->GetOutputStringLength();}; 00063 unsigned char* GetBinaryOutputString() {return this->Writer->GetBinaryOutputString();}; 00064 void SetFieldDataName(const char *fieldname) {this->Writer->SetFieldDataName(fieldname);}; 00065 char *GetFieldDataName() {return this->Writer->GetFieldDataName();}; 00067 00068 protected: 00069 vtkDataObjectWriter(); 00070 ~vtkDataObjectWriter(); 00071 00072 void WriteData(); 00073 vtkDataWriter *Writer; 00074 00075 virtual int FillInputPortInformation(int port, vtkInformation *info); 00076 00077 private: 00078 vtkDataObjectWriter(const vtkDataObjectWriter&); // Not implemented. 00079 void operator=(const vtkDataObjectWriter&); // Not implemented. 00080 }; 00081 00082 #endif