VTK
vtkDataObjectWriter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkDataObjectWriter.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 vtkDataObjectWriter_h
34#define vtkDataObjectWriter_h
35
36#include "vtkIOLegacyModule.h" // For export macro
37#include "vtkWriter.h"
38#include "vtkDataWriter.h" // Needs data because it calls methods on it
39#include "vtkStdString.h" // For string used in api
40
41class VTKIOLEGACY_EXPORT vtkDataObjectWriter : public vtkWriter
42{
43public:
46 void PrintSelf(ostream& os, vtkIndent indent);
47
49
52 void SetFileName(const char *filename) {this->Writer->SetFileName(filename);};
53 char *GetFileName() {return this->Writer->GetFileName();};
54 void SetHeader(const char *header) {this->Writer->SetHeader(header);};
55 char *GetHeader() {return this->Writer->GetHeader();};
56 void SetFileType(int type) {this->Writer->SetFileType(type);};
57 int GetFileType() {return this->Writer->GetFileType();};
58 void SetFileTypeToASCII() {this->Writer->SetFileType(VTK_ASCII);};
59 void SetFileTypeToBinary() {this->Writer->SetFileType(VTK_BINARY);};
60 void SetWriteToOutputString(int b) {this->Writer->SetWriteToOutputString(b);};
61 void WriteToOutputStringOn() {this->Writer->WriteToOutputStringOn();};
62 void WriteToOutputStringOff() {this->Writer->WriteToOutputStringOff();};
63 int GetWriteToOutputString() {return this->Writer->GetWriteToOutputString();};
64 char* GetOutputString() {return this->Writer->GetOutputString();};
65 vtkStdString GetOutputStdString() {return this->Writer->GetOutputStdString();};
66 int GetOutputStringLength() {return this->Writer->GetOutputStringLength();};
67 unsigned char* GetBinaryOutputString() {return this->Writer->GetBinaryOutputString();};
68 void SetFieldDataName(const char *fieldname) {this->Writer->SetFieldDataName(fieldname);};
69 char *GetFieldDataName() {return this->Writer->GetFieldDataName();};
71
72protected:
75
76 void WriteData();
78
80
81private:
82 vtkDataObjectWriter(const vtkDataObjectWriter&) VTK_DELETE_FUNCTION;
83 void operator=(const vtkDataObjectWriter&) VTK_DELETE_FUNCTION;
84};
85
86#endif
write vtk field data
vtkDataWriter * Writer
void SetFileName(const char *filename)
Methods delegated to vtkDataWriter, see vtkDataWriter.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void SetWriteToOutputString(int b)
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
static vtkDataObjectWriter * New()
vtkStdString GetOutputStdString()
void SetFieldDataName(const char *fieldname)
void SetFileType(int type)
unsigned char * GetBinaryOutputString()
void SetHeader(const char *header)
helper class for objects that write vtk data files
Definition: vtkDataWriter.h:46
a simple class to control print indentation
Definition: vtkIndent.h:40
Store vtkAlgorithm input/output information.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:49
abstract class to write data to file(s)
Definition: vtkWriter.h:43
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
@ type
Definition: vtkX3D.h:516
#define VTK_BINARY
Definition: vtkWriter.h:40
#define VTK_ASCII
Definition: vtkWriter.h:39