Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members   Related Pages  

vtkDataWriter Class Reference

helper class for objects that write vtk data files. More...

#include <vtkDataWriter.h>

Inheritance diagram for vtkDataWriter:

Inheritance graph
[legend]
Collaboration diagram for vtkDataWriter:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
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 ()
char * RegisterAndGetOutputString ()
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 SetGhostLevelsName (const char *)
virtual char * GetGhostLevelsName ()
virtual void SetNormalsName (const char *)
virtual char * GetNormalsName ()
virtual void SetTCoordsName (const char *)
virtual char * GetTCoordsName ()
virtual void SetLookupTableName (const char *)
virtual char * GetLookupTableName ()
virtual void SetFieldDataName (const char *)
virtual char * GetFieldDataName ()
virtual ostream * OpenVTKFile ()
int WriteHeader (ostream *fp)
int WritePoints (ostream *fp, vtkPoints *p)
int WriteCoordinates (ostream *fp, vtkScalars *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 WriteFieldData (ostream *fp, vtkFieldData *f)
int WriteDataSetData (ostream *fp, vtkDataSet *ds)
void CloseVTKFile (ostream *fp)

Static Public Methods

int IsTypeOf (const char *type)
vtkDataWriter * SafeDownCast (vtkObject *o)
vtkDataWriter * New ()

Protected Methods

 vtkDataWriter ()
 ~vtkDataWriter ()
 vtkDataWriter (const vtkDataWriter &)
void operator= (const vtkDataWriter &)
void WriteData ()
int WriteArray (ostream *fp, int dataType, vtkDataArray *data, const char *format, int num, int numComp)
int WriteScalarData (ostream *fp, vtkScalars *s, int num)
int WriteVectorData (ostream *fp, vtkVectors *v, int num)
int WriteNormalData (ostream *fp, vtkNormals *n, int num)
int WriteTCoordData (ostream *fp, vtkTCoords *tc, int num)
int WriteTensorData (ostream *fp, vtkTensors *t, int num)
int WriteGhostLevelData (ostream *fp, vtkGhostLevels *g, int num)

Protected Attributes

int WriteToOutputString
char * OutputString
int OutputStringLength
int OutputStringAllocatedLength
char * FileName
char * Header
int FileType
char * ScalarsName
char * VectorsName
char * TensorsName
char * GhostLevelsName
char * TCoordsName
char * NormalsName
char * LookupTableName
char * FieldDataName

Detailed Description

helper class for objects that write vtk data files.

Date:
2000/12/10 20:08:35
Revision:
1.43

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.

See also:
vtkDataSetWriter vtkPolyDataWriter vtkStructuredGridWriter vtkStructuredPointsWriter vtkUnstructuredGridWriter vtkFieldDataWriter vtkRectilinearGridWriter


Member Function Documentation

void vtkDataWriter::CloseVTKFile ostream *    fp
 

Close a vtk file.

virtual const char* vtkDataWriter::GetClassName   [virtual]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkWriter.

Reimplemented in vtkCGMWriter.

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 int vtkDataWriter::IsA const char *    type [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 vtkCGMWriter.

int vtkDataWriter::IsTypeOf const char *    type [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 vtkCGMWriter.

vtkDataWriter* vtkDataWriter::New   [static]
 

Created object with default header, ASCII format, and default names for scalars, vectors, tensors, normals, and texture coordinates.

Reimplemented from vtkProcessObject.

Reimplemented in vtkCGMWriter.

virtual ostream* vtkDataWriter::OpenVTKFile   [virtual]
 

Open a vtk data file. Returns NULL if error.

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 vtkCGMWriter.

char* vtkDataWriter::RegisterAndGetOutputString  
 

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.

vtkDataWriter* vtkDataWriter::SafeDownCast vtkObject   o [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkWriter.

Reimplemented in vtkCGMWriter.

virtual void vtkDataWriter::SetFieldDataName const char *    [virtual]
 

Give a name to the field data. If not specified, uses default name "field".

virtual void vtkDataWriter::SetFileName const char *    [virtual]
 

Specify file name of vtk polygon data file to write.

virtual void vtkDataWriter::SetFileType int    [virtual]
 

Specify file type (ASCII or BINARY) for vtk data file.

virtual void vtkDataWriter::SetGhostLevelsName const char *    [virtual]
 

Give a name to the ghost levels data. If not specified, uses default name "ghostLevels".

virtual void vtkDataWriter::SetHeader const char *    [virtual]
 

Specify the header for the vtk data file.

virtual void vtkDataWriter::SetLookupTableName const char *    [virtual]
 

Give a name to the lookup table. If not specified, uses default name "lookupTable".

virtual void vtkDataWriter::SetNormalsName const char *    [virtual]
 

Give a name to the normals data. If not specified, uses default name "normals".

virtual void vtkDataWriter::SetScalarsName const char *    [virtual]
 

Give a name to the scalar data. If not specified, uses default name "scalars".

virtual void vtkDataWriter::SetTCoordsName const char *    [virtual]
 

Give a name to the texture coordinates data. If not specified, uses default name "textureCoords".

virtual void vtkDataWriter::SetTensorsName const char *    [virtual]
 

Give a name to the tensors data. If not specified, uses default name "tensors".

virtual void vtkDataWriter::SetVectorsName const char *    [virtual]
 

Give a name to the vector data. If not specified, uses default name "vectors".

virtual void vtkDataWriter::SetWriteToOutputString int    [virtual]
 

Enable writing to an OutputString instead of the default, a file.

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::WriteCells ostream *    fp,
vtkCellArray   cells,
const char *    label
 

Write out the cells of the data set.

int vtkDataWriter::WriteCoordinates ostream *    fp,
vtkScalars   coords,
int    axes
 

Write out coordinates for rectilinear grids.

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).

int vtkDataWriter::WriteFieldData ostream *    fp,
vtkFieldData   f
 

Write out the field data.

int vtkDataWriter::WriteHeader ostream *    fp
 

Write the header of a vtk data file. 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::WritePoints ostream *    fp,
vtkPoints   p
 

Write out the points of the data set.


The documentation for this class was generated from the following file:
Generated on Tue Mar 19 13:24:50 2002 for VTK by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002