VTK
|
helper class for objects that write vtk data files More...
#include <vtkDataWriter.h>
Public Types | |
typedef vtkWriter | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkDataWriter * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
vtkStdString | GetOutputStdString () |
char * | RegisterAndGetOutputString () |
virtual ostream * | OpenVTKFile () |
int | WriteHeader (ostream *fp) |
int | WritePoints (ostream *fp, vtkPoints *p) |
int | WriteCoordinates (ostream *fp, vtkDataArray *coords, int axes) |
int | WriteCells (ostream *fp, vtkCellArray *cells, const char *label) |
int | WriteCellData (ostream *fp, vtkDataSet *ds) |
int | WritePointData (ostream *fp, vtkDataSet *ds) |
int | WriteEdgeData (ostream *fp, vtkGraph *g) |
int | WriteVertexData (ostream *fp, vtkGraph *g) |
int | WriteRowData (ostream *fp, vtkTable *g) |
int | WriteFieldData (ostream *fp, vtkFieldData *f) |
int | WriteDataSetData (ostream *fp, vtkDataSet *ds) |
void | CloseVTKFile (ostream *fp) |
virtual void | SetFileName (const char *) |
virtual char * | GetFileName () |
virtual void | SetWriteToOutputString (int) |
virtual int | GetWriteToOutputString () |
virtual void | WriteToOutputStringOn () |
virtual void | WriteToOutputStringOff () |
virtual int | GetOutputStringLength () |
virtual char * | GetOutputString () |
unsigned char * | GetBinaryOutputString () |
virtual void | SetHeader (const char *) |
virtual char * | GetHeader () |
virtual void | SetFileType (int) |
virtual int | GetFileType () |
void | SetFileTypeToASCII () |
void | SetFileTypeToBinary () |
virtual void | SetScalarsName (const char *) |
virtual char * | GetScalarsName () |
virtual void | SetVectorsName (const char *) |
virtual char * | GetVectorsName () |
virtual void | SetTensorsName (const char *) |
virtual char * | GetTensorsName () |
virtual void | SetNormalsName (const char *) |
virtual char * | GetNormalsName () |
virtual void | SetTCoordsName (const char *) |
virtual char * | GetTCoordsName () |
virtual void | SetGlobalIdsName (const char *) |
virtual char * | GetGlobalIdsName () |
virtual void | SetPedigreeIdsName (const char *) |
virtual char * | GetPedigreeIdsName () |
virtual void | SetLookupTableName (const char *) |
virtual char * | GetLookupTableName () |
virtual void | SetFieldDataName (const char *) |
virtual char * | GetFieldDataName () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkDataWriter * | SafeDownCast (vtkObjectBase *o) |
static vtkDataWriter * | New () |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkDataWriter () | |
~vtkDataWriter () | |
void | WriteData () |
int | WriteArray (ostream *fp, int dataType, vtkAbstractArray *data, const char *format, int num, int numComp) |
int | WriteScalarData (ostream *fp, vtkDataArray *s, int num) |
int | WriteVectorData (ostream *fp, vtkDataArray *v, int num) |
int | WriteNormalData (ostream *fp, vtkDataArray *n, int num) |
int | WriteTCoordData (ostream *fp, vtkDataArray *tc, int num) |
int | WriteTensorData (ostream *fp, vtkDataArray *t, int num) |
int | WriteGlobalIdData (ostream *fp, vtkDataArray *g, int num) |
int | WritePedigreeIdData (ostream *fp, vtkAbstractArray *p, int num) |
Protected Attributes | |
int | WriteToOutputString |
char * | OutputString |
int | OutputStringLength |
char * | FileName |
char * | Header |
int | FileType |
char * | ScalarsName |
char * | VectorsName |
char * | TensorsName |
char * | TCoordsName |
char * | NormalsName |
char * | LookupTableName |
char * | FieldDataName |
char * | GlobalIdsName |
char * | PedigreeIdsName |
helper class for objects that write vtk data files
vtkDataWriter is a helper class that opens and writes the vtk header and point data (e.g., scalars, vectors, normals, etc.) from a vtk data file. See text for various formats.
Definition at line 42 of file vtkDataWriter.h.
typedef vtkWriter vtkDataWriter::Superclass |
Reimplemented from vtkWriter.
Reimplemented in vtkDIMACSGraphWriter, vtkCGMWriter, vtkCompositeDataWriter, vtkPolyDataWriter, vtkUnstructuredGridWriter, vtkRectilinearGridWriter, vtkStructuredGridWriter, vtkPDataSetWriter, vtkTableWriter, vtkSimplePointsWriter, vtkDataSetWriter, vtkGraphWriter, vtkStructuredPointsWriter, vtkTreeWriter, and vtkGenericDataObjectWriter.
Definition at line 45 of file vtkDataWriter.h.
vtkDataWriter::vtkDataWriter | ( | ) | [protected] |
vtkDataWriter::~vtkDataWriter | ( | ) | [protected] |
static int vtkDataWriter::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkWriter.
Reimplemented in vtkDIMACSGraphWriter, vtkCGMWriter, vtkCompositeDataWriter, vtkPolyDataWriter, vtkUnstructuredGridWriter, vtkRectilinearGridWriter, vtkStructuredGridWriter, vtkPDataSetWriter, vtkTableWriter, vtkSimplePointsWriter, vtkDataSetWriter, vtkGraphWriter, vtkStructuredPointsWriter, vtkTreeWriter, and vtkGenericDataObjectWriter.
virtual int vtkDataWriter::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkWriter.
Reimplemented in vtkDIMACSGraphWriter, vtkCGMWriter, vtkCompositeDataWriter, vtkPolyDataWriter, vtkUnstructuredGridWriter, vtkRectilinearGridWriter, vtkStructuredGridWriter, vtkPDataSetWriter, vtkTableWriter, vtkSimplePointsWriter, vtkDataSetWriter, vtkGraphWriter, vtkStructuredPointsWriter, vtkTreeWriter, and vtkGenericDataObjectWriter.
static vtkDataWriter* vtkDataWriter::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkWriter.
Reimplemented in vtkDIMACSGraphWriter, vtkCGMWriter, vtkCompositeDataWriter, vtkPolyDataWriter, vtkUnstructuredGridWriter, vtkRectilinearGridWriter, vtkStructuredGridWriter, vtkPDataSetWriter, vtkTableWriter, vtkSimplePointsWriter, vtkDataSetWriter, vtkGraphWriter, vtkStructuredPointsWriter, vtkTreeWriter, and vtkGenericDataObjectWriter.
virtual vtkObjectBase* vtkDataWriter::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkWriter.
Reimplemented in vtkDIMACSGraphWriter, vtkCGMWriter, vtkCompositeDataWriter, vtkPolyDataWriter, vtkUnstructuredGridWriter, vtkRectilinearGridWriter, vtkStructuredGridWriter, vtkPDataSetWriter, vtkTableWriter, vtkSimplePointsWriter, vtkDataSetWriter, vtkGraphWriter, vtkStructuredPointsWriter, vtkTreeWriter, and vtkGenericDataObjectWriter.
vtkDataWriter* vtkDataWriter::NewInstance | ( | ) | const |
Reimplemented from vtkWriter.
Reimplemented in vtkDIMACSGraphWriter, vtkCGMWriter, vtkCompositeDataWriter, vtkPolyDataWriter, vtkUnstructuredGridWriter, vtkRectilinearGridWriter, vtkStructuredGridWriter, vtkPDataSetWriter, vtkTableWriter, vtkSimplePointsWriter, vtkDataSetWriter, vtkGraphWriter, vtkStructuredPointsWriter, vtkTreeWriter, and vtkGenericDataObjectWriter.
void vtkDataWriter::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkWriter.
Reimplemented in vtkDIMACSGraphWriter, vtkCGMWriter, vtkCompositeDataWriter, vtkPolyDataWriter, vtkUnstructuredGridWriter, vtkRectilinearGridWriter, vtkStructuredGridWriter, vtkTableWriter, vtkSimplePointsWriter, vtkPDataSetWriter, vtkDataSetWriter, vtkGraphWriter, vtkStructuredPointsWriter, vtkTreeWriter, and vtkGenericDataObjectWriter.
static vtkDataWriter* vtkDataWriter::New | ( | ) | [static] |
Created object with default header, ASCII format, and default names for scalars, vectors, tensors, normals, and texture coordinates.
Reimplemented from vtkAlgorithm.
Reimplemented in vtkDIMACSGraphWriter, vtkCGMWriter, vtkCompositeDataWriter, vtkPolyDataWriter, vtkUnstructuredGridWriter, vtkPDataSetWriter, vtkRectilinearGridWriter, vtkStructuredGridWriter, vtkTableWriter, vtkSimplePointsWriter, vtkDataSetWriter, vtkGraphWriter, vtkStructuredPointsWriter, vtkTreeWriter, and vtkGenericDataObjectWriter.
virtual void vtkDataWriter::SetFileName | ( | const char * | ) | [virtual] |
Specify file name of vtk polygon data file to write.
virtual char* vtkDataWriter::GetFileName | ( | ) | [virtual] |
Specify file name of vtk polygon data file to write.
virtual void vtkDataWriter::SetWriteToOutputString | ( | int | ) | [virtual] |
Enable writing to an OutputString instead of the default, a file.
virtual int vtkDataWriter::GetWriteToOutputString | ( | ) | [virtual] |
Enable writing to an OutputString instead of the default, a file.
virtual void vtkDataWriter::WriteToOutputStringOn | ( | ) | [virtual] |
Enable writing to an OutputString instead of the default, a file.
virtual void vtkDataWriter::WriteToOutputStringOff | ( | ) | [virtual] |
Enable writing to an OutputString instead of the default, a file.
virtual int vtkDataWriter::GetOutputStringLength | ( | ) | [virtual] |
When WriteToOutputString in on, then a string is allocated, written to, and can be retrieved with these methods. The string is deleted during the next call to write ...
virtual char* vtkDataWriter::GetOutputString | ( | ) | [virtual] |
When WriteToOutputString in on, then a string is allocated, written to, and can be retrieved with these methods. The string is deleted during the next call to write ...
unsigned char* vtkDataWriter::GetBinaryOutputString | ( | ) | [inline] |
When WriteToOutputString in on, then a string is allocated, written to, and can be retrieved with these methods. The string is deleted during the next call to write ...
Definition at line 71 of file vtkDataWriter.h.
When WriteToOutputString is on, this method returns a copy of the output string in a vtkStdString.
This convenience method returns the string, sets the IVAR to NULL, so that the user is responsible for deleting the string. I am not sure what the name should be, so it may change in the future.
virtual void vtkDataWriter::SetHeader | ( | const char * | ) | [virtual] |
Specify the header for the vtk data file.
virtual char* vtkDataWriter::GetHeader | ( | ) | [virtual] |
Specify the header for the vtk data file.
virtual void vtkDataWriter::SetFileType | ( | int | ) | [virtual] |
Specify file type (ASCII or BINARY) for vtk data file.
virtual int vtkDataWriter::GetFileType | ( | ) | [virtual] |
Specify file type (ASCII or BINARY) for vtk data file.
void vtkDataWriter::SetFileTypeToASCII | ( | ) | [inline] |
Specify file type (ASCII or BINARY) for vtk data file.
Definition at line 96 of file vtkDataWriter.h.
void vtkDataWriter::SetFileTypeToBinary | ( | ) | [inline] |
Specify file type (ASCII or BINARY) for vtk data file.
Definition at line 97 of file vtkDataWriter.h.
virtual void vtkDataWriter::SetScalarsName | ( | const char * | ) | [virtual] |
Give a name to the scalar data. If not specified, uses default name "scalars".
virtual char* vtkDataWriter::GetScalarsName | ( | ) | [virtual] |
Give a name to the scalar data. If not specified, uses default name "scalars".
virtual void vtkDataWriter::SetVectorsName | ( | const char * | ) | [virtual] |
Give a name to the vector data. If not specified, uses default name "vectors".
virtual char* vtkDataWriter::GetVectorsName | ( | ) | [virtual] |
Give a name to the vector data. If not specified, uses default name "vectors".
virtual void vtkDataWriter::SetTensorsName | ( | const char * | ) | [virtual] |
Give a name to the tensors data. If not specified, uses default name "tensors".
virtual char* vtkDataWriter::GetTensorsName | ( | ) | [virtual] |
Give a name to the tensors data. If not specified, uses default name "tensors".
virtual void vtkDataWriter::SetNormalsName | ( | const char * | ) | [virtual] |
Give a name to the normals data. If not specified, uses default name "normals".
virtual char* vtkDataWriter::GetNormalsName | ( | ) | [virtual] |
Give a name to the normals data. If not specified, uses default name "normals".
virtual void vtkDataWriter::SetTCoordsName | ( | const char * | ) | [virtual] |
Give a name to the texture coordinates data. If not specified, uses default name "textureCoords".
virtual char* vtkDataWriter::GetTCoordsName | ( | ) | [virtual] |
Give a name to the texture coordinates data. If not specified, uses default name "textureCoords".
virtual void vtkDataWriter::SetGlobalIdsName | ( | const char * | ) | [virtual] |
Give a name to the global ids data. If not specified, uses default name "global_ids".
virtual char* vtkDataWriter::GetGlobalIdsName | ( | ) | [virtual] |
Give a name to the global ids data. If not specified, uses default name "global_ids".
virtual void vtkDataWriter::SetPedigreeIdsName | ( | const char * | ) | [virtual] |
Give a name to the pedigree ids data. If not specified, uses default name "pedigree_ids".
virtual char* vtkDataWriter::GetPedigreeIdsName | ( | ) | [virtual] |
Give a name to the pedigree ids data. If not specified, uses default name "pedigree_ids".
virtual void vtkDataWriter::SetLookupTableName | ( | const char * | ) | [virtual] |
Give a name to the lookup table. If not specified, uses default name "lookupTable".
virtual char* vtkDataWriter::GetLookupTableName | ( | ) | [virtual] |
Give a name to the lookup table. If not specified, uses default name "lookupTable".
virtual void vtkDataWriter::SetFieldDataName | ( | const char * | ) | [virtual] |
Give a name to the field data. If not specified, uses default name "field".
virtual char* vtkDataWriter::GetFieldDataName | ( | ) | [virtual] |
Give a name to the field data. If not specified, uses default name "field".
virtual ostream* vtkDataWriter::OpenVTKFile | ( | ) | [virtual] |
Open a vtk data file. Returns NULL if error.
int vtkDataWriter::WriteHeader | ( | ostream * | fp | ) |
Write the header of a vtk data file. Returns 0 if error.
int vtkDataWriter::WritePoints | ( | ostream * | fp, |
vtkPoints * | p | ||
) |
Write out the points of the data set.
int vtkDataWriter::WriteCoordinates | ( | ostream * | fp, |
vtkDataArray * | coords, | ||
int | axes | ||
) |
Write out coordinates for rectilinear grids.
int vtkDataWriter::WriteCells | ( | ostream * | fp, |
vtkCellArray * | cells, | ||
const char * | label | ||
) |
Write out the cells of the data set.
int vtkDataWriter::WriteCellData | ( | ostream * | fp, |
vtkDataSet * | ds | ||
) |
Write the cell data (e.g., scalars, vectors, ...) of a vtk dataset. Returns 0 if error.
int vtkDataWriter::WritePointData | ( | ostream * | fp, |
vtkDataSet * | ds | ||
) |
Write the point data (e.g., scalars, vectors, ...) of a vtk dataset. Returns 0 if error.
int vtkDataWriter::WriteEdgeData | ( | ostream * | fp, |
vtkGraph * | g | ||
) |
Write the edge data (e.g., scalars, vectors, ...) of a vtk graph. Returns 0 if error.
int vtkDataWriter::WriteVertexData | ( | ostream * | fp, |
vtkGraph * | g | ||
) |
Write the vertex data (e.g., scalars, vectors, ...) of a vtk graph. Returns 0 if error.
int vtkDataWriter::WriteRowData | ( | ostream * | fp, |
vtkTable * | g | ||
) |
Write the row data (e.g., scalars, vectors, ...) of a vtk table. Returns 0 if error.
int vtkDataWriter::WriteFieldData | ( | ostream * | fp, |
vtkFieldData * | f | ||
) |
Write out the field data.
int vtkDataWriter::WriteDataSetData | ( | ostream * | fp, |
vtkDataSet * | ds | ||
) |
Write out the data associated with the dataset (i.e. field data owned by the dataset itself - distinct from that owned by the cells or points).
void vtkDataWriter::CloseVTKFile | ( | ostream * | fp | ) |
Close a vtk file.
void vtkDataWriter::WriteData | ( | ) | [protected, virtual] |
Implements vtkWriter.
Reimplemented in vtkCGMWriter, vtkDIMACSGraphWriter, vtkCompositeDataWriter, vtkPolyDataWriter, vtkUnstructuredGridWriter, vtkRectilinearGridWriter, vtkStructuredGridWriter, vtkTableWriter, vtkDataSetWriter, vtkGraphWriter, vtkStructuredPointsWriter, vtkTreeWriter, vtkSimplePointsWriter, and vtkGenericDataObjectWriter.
int vtkDataWriter::WriteArray | ( | ostream * | fp, |
int | dataType, | ||
vtkAbstractArray * | data, | ||
const char * | format, | ||
int | num, | ||
int | numComp | ||
) | [protected] |
int vtkDataWriter::WriteScalarData | ( | ostream * | fp, |
vtkDataArray * | s, | ||
int | num | ||
) | [protected] |
int vtkDataWriter::WriteVectorData | ( | ostream * | fp, |
vtkDataArray * | v, | ||
int | num | ||
) | [protected] |
int vtkDataWriter::WriteNormalData | ( | ostream * | fp, |
vtkDataArray * | n, | ||
int | num | ||
) | [protected] |
int vtkDataWriter::WriteTCoordData | ( | ostream * | fp, |
vtkDataArray * | tc, | ||
int | num | ||
) | [protected] |
int vtkDataWriter::WriteTensorData | ( | ostream * | fp, |
vtkDataArray * | t, | ||
int | num | ||
) | [protected] |
int vtkDataWriter::WriteGlobalIdData | ( | ostream * | fp, |
vtkDataArray * | g, | ||
int | num | ||
) | [protected] |
int vtkDataWriter::WritePedigreeIdData | ( | ostream * | fp, |
vtkAbstractArray * | p, | ||
int | num | ||
) | [protected] |
int vtkDataWriter::WriteToOutputString [protected] |
Definition at line 214 of file vtkDataWriter.h.
char* vtkDataWriter::OutputString [protected] |
Definition at line 215 of file vtkDataWriter.h.
int vtkDataWriter::OutputStringLength [protected] |
Definition at line 216 of file vtkDataWriter.h.
char* vtkDataWriter::FileName [protected] |
Definition at line 220 of file vtkDataWriter.h.
char* vtkDataWriter::Header [protected] |
Definition at line 221 of file vtkDataWriter.h.
int vtkDataWriter::FileType [protected] |
Definition at line 222 of file vtkDataWriter.h.
char* vtkDataWriter::ScalarsName [protected] |
Definition at line 224 of file vtkDataWriter.h.
char* vtkDataWriter::VectorsName [protected] |
Definition at line 225 of file vtkDataWriter.h.
char* vtkDataWriter::TensorsName [protected] |
Definition at line 226 of file vtkDataWriter.h.
char* vtkDataWriter::TCoordsName [protected] |
Definition at line 227 of file vtkDataWriter.h.
char* vtkDataWriter::NormalsName [protected] |
Definition at line 228 of file vtkDataWriter.h.
char* vtkDataWriter::LookupTableName [protected] |
Definition at line 229 of file vtkDataWriter.h.
char* vtkDataWriter::FieldDataName [protected] |
Definition at line 230 of file vtkDataWriter.h.
char* vtkDataWriter::GlobalIdsName [protected] |
Definition at line 231 of file vtkDataWriter.h.
char* vtkDataWriter::PedigreeIdsName [protected] |
Definition at line 232 of file vtkDataWriter.h.