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" // Neds data because it calls methods on it 00037 00038 class VTK_IO_EXPORT vtkDataObjectWriter : public vtkWriter 00039 { 00040 public: 00041 static vtkDataObjectWriter *New(); 00042 vtkTypeMacro(vtkDataObjectWriter,vtkWriter); 00043 void PrintSelf(ostream& os, vtkIndent indent); 00044 00046 00047 void SetFileName(const char *filename) {this->Writer->SetFileName(filename);}; 00048 char *GetFileName() {return this->Writer->GetFileName();}; 00049 void SetHeader(const char *header) {this->Writer->SetHeader(header);}; 00050 char *GetHeader() {return this->Writer->GetHeader();}; 00051 void SetFileType(int type) {this->Writer->SetFileType(type);}; 00052 int GetFileType() {return this->Writer->GetFileType();}; 00053 void SetFileTypeToASCII() {this->Writer->SetFileType(VTK_ASCII);}; 00054 void SetFileTypeToBinary() {this->Writer->SetFileType(VTK_BINARY);}; 00055 void SetFieldDataName(const char *fieldname) {this->Writer->SetFieldDataName(fieldname);}; 00056 char *GetFieldDataName() {return this->Writer->GetFieldDataName();}; 00058 00059 protected: 00060 vtkDataObjectWriter(); 00061 ~vtkDataObjectWriter(); 00062 00063 void WriteData(); 00064 vtkDataWriter *Writer; 00065 00066 virtual int FillInputPortInformation(int port, vtkInformation *info); 00067 00068 private: 00069 vtkDataObjectWriter(const vtkDataObjectWriter&); // Not implemented. 00070 void operator=(const vtkDataObjectWriter&); // Not implemented. 00071 }; 00072 00073 #endif