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

vtkDataReader Class Reference

helper superclass for objects that read vtk data files. More...

#include <vtkDataReader.h>

Inheritance diagram for vtkDataReader:

Inheritance graph
[legend]
Collaboration diagram for vtkDataReader:

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 ()
int IsFileValid (const char *dstype)
int IsFileStructuredPoints ()
int IsFilePolyData ()
int IsFileStructuredGrid ()
int IsFileUnstructuredGrid ()
int IsFileRectilinearGrid ()
void SetInputString (const char *in)
virtual char * GetInputString ()
void SetInputString (const char *in, int len)
virtual int GetInputStringLength ()
void SetBinaryInputString (const char *, int len)
virtual char * GetHeader ()
virtual void SetReadFromInputString (int)
virtual int GetReadFromInputString ()
virtual void ReadFromInputStringOn ()
virtual void ReadFromInputStringOff ()
virtual int GetFileType ()
int GetNumberOfScalarsInFile ()
int GetNumberOfVectorsInFile ()
int GetNumberOfTensorsInFile ()
int GetNumberOfNormalsInFile ()
int GetNumberOfTCoordsInFile ()
int GetNumberOfFieldDataInFile ()
int GetNumberOfGhostLevelsInFile ()
const char * GetScalarsNameInFile (int i)
const char * GetVectorsNameInFile (int i)
const char * GetTensorsNameInFile (int i)
const char * GetNormalsNameInFile (int i)
const char * GetTCoordsNameInFile (int i)
const char * GetFieldDataNameInFile (int i)
const char * GetGhostLevelsNameInFile (int i)
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 ()
int OpenVTKFile ()
int ReadHeader ()
int ReadCellData (vtkDataSet *ds, int numCells)
int ReadPointData (vtkDataSet *ds, int numPts)
int ReadPoints (vtkPointSet *ps, int numPts)
int ReadCells (int size, int *data)
int ReadCells (int size, int *data, int skip1, int read2, int skip3)
int ReadCoordinates (vtkRectilinearGrid *rg, int axes, int numCoords)
vtkDataArrayReadArray (const char *dataType, int numTuples, int numComp)
vtkFieldDataReadFieldData ()
int Read (char *)
int Read (unsigned char *)
int Read (short *)
int Read (unsigned short *)
int Read (int *)
int Read (unsigned int *)
int Read (long *)
int Read (unsigned long *)
int Read (float *)
int Read (double *)
void CloseVTKFile ()
int ReadLine (char result[256])
int ReadString (char result[256])
char * LowerCase (char *)
istream * GetIStream ()

Static Public Methods

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

Protected Methods

 vtkDataReader ()
 ~vtkDataReader ()
 vtkDataReader (const vtkDataReader &)
void operator= (const vtkDataReader &)
virtual void SetScalarLut (const char *)
virtual char * GetScalarLut ()
int ReadScalarData (vtkDataSetAttributes *a, int num)
int ReadVectorData (vtkDataSetAttributes *a, int num)
int ReadNormalData (vtkDataSetAttributes *a, int num)
int ReadTensorData (vtkDataSetAttributes *a, int num)
int ReadGhostLevelData (vtkDataSetAttributes *a, int num)
int ReadCoScalarData (vtkDataSetAttributes *a, int num)
int ReadLutData (vtkDataSetAttributes *a)
int ReadTCoordsData (vtkDataSetAttributes *a, int num)
int ReadDataSetData (vtkDataSet *ds)
void InitializeCharacteristics ()
int CharacterizeFile ()
void CheckFor (const char *name, char *line, int &num, char **&array, int &allocSize)

Protected Attributes

char * FileName
int FileType
istream * IS
char * ScalarsName
char * VectorsName
char * TensorsName
char * GhostLevelsName
char * TCoordsName
char * NormalsName
char * LookupTableName
char * FieldDataName
char * ScalarLut
int ReadFromInputString
char * InputString
int InputStringLength
int InputStringPos
char * Header
int NumberOfScalarsInFile
char ** ScalarsNameInFile
int ScalarsNameAllocSize
int NumberOfVectorsInFile
char ** VectorsNameInFile
int VectorsNameAllocSize
int NumberOfTensorsInFile
char ** TensorsNameInFile
int TensorsNameAllocSize
int NumberOfGhostLevelsInFile
char ** GhostLevelsNameInFile
int GhostLevelsNameAllocSize
int NumberOfTCoordsInFile
char ** TCoordsNameInFile
int TCoordsNameAllocSize
int NumberOfNormalsInFile
char ** NormalsNameInFile
int NormalsNameAllocSize
int NumberOfFieldDataInFile
char ** FieldDataNameInFile
int FieldDataNameAllocSize
vtkTimeStamp CharacteristicsTime

Detailed Description

helper superclass for objects that read vtk data files.

Date:
2000/12/10 20:08:34
Revision:
1.59

vtkDataReader is a helper superclass that reads the vtk data file header, dataset type, and attribute data (point and cell attributes such as scalars, vectors, normals, etc.) from a vtk data file. See text for the format of the various vtk file types.

See also:
vtkPolyDataReader vtkStructuredPointsReader vtkStructuredGridReader vtkUnsutructuredGridReader vtkRectilinearGridReader


Member Function Documentation

void vtkDataReader::CloseVTKFile  
 

Close the vtk file.

virtual const char* vtkDataReader::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 vtkSource.

Reimplemented in vtkDataObjectReader.

virtual int vtkDataReader::GetFileType   [virtual]
 

Get the type of file (ASCII or BINARY). Returned value only valid after file has been read.

virtual char* vtkDataReader::GetHeader   [virtual]
 

Get the header from the vtk data file.

istream* vtkDataReader::GetIStream   [inline]
 

Return the istream being used to read in the data.

int vtkDataReader::GetNumberOfScalarsInFile   [inline]
 

How many attributes of various types are in this file? This requires reading the file, so the filename must be set prior to invoking this operation. (Note: file characteristics are cached, so only a single read is necessary to return file characteristics.)

const char* vtkDataReader::GetScalarsNameInFile int    i
 

What is the name of the ith attribute of a certain type in this file? This requires reading the file, so the filename must be set prior to invoking this operation.

virtual int vtkDataReader::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 vtkSource.

Reimplemented in vtkDataObjectReader.

int vtkDataReader::IsFileValid const char *    dstype
 

Is the file a valid vtk file of the passed dataset type ? The dataset type is passed as a lower case string.

int vtkDataReader::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 vtkSource.

Reimplemented in vtkDataObjectReader.

char* vtkDataReader::LowerCase char *   
 

Helper method for reading in data.

vtkDataReader* vtkDataReader::New   [static]
 

Instantiate object with no start, end, or progress methods.

Reimplemented from vtkSource.

Reimplemented in vtkDataObjectReader.

int vtkDataReader::OpenVTKFile  
 

Open a vtk data file. Returns zero if error.

void vtkDataReader::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 vtkSource.

Reimplemented in vtkDataObjectReader.

int vtkDataReader::Read char *   
 

Internal function to read in a value. Returns zero if there was an error.

vtkDataArray* vtkDataReader::ReadArray const char *    dataType,
int    numTuples,
int    numComp
 

Helper functions for reading data.

int vtkDataReader::ReadCellData vtkDataSet   ds,
int    numCells
 

Read the cell data of a vtk data file. The number of cells (from the dataset) must match the number of cells defined in cell attributes (unless no geometry was defined).

int vtkDataReader::ReadCells int    size,
int *    data,
int    skip1,
int    read2,
int    skip3
 

Read a piece of the cells (for streaming compliance)

int vtkDataReader::ReadCells int    size,
int *    data
 

Read a bunch of "cells". Return 0 if error.

int vtkDataReader::ReadCoordinates vtkRectilinearGrid   rg,
int    axes,
int    numCoords
 

Read the coordinates for a rectilinear grid. The axes parameter specifies which coordinate axes (0,1,2) is being read.

int vtkDataReader::ReadHeader  
 

Read the header of a vtk data file. Returns 0 if error.

int vtkDataReader::ReadLine char    result[256]
 

Internal function to read in a line up to 256 characters. Returns zero if there was an error.

int vtkDataReader::ReadPointData vtkDataSet   ds,
int    numPts
 

Read the point data of a vtk data file. The number of points (from the dataset) must match the number of points defined in point attributes (unless no geometry was defined).

int vtkDataReader::ReadPoints vtkPointSet   ps,
int    numPts
 

Read point coordinates. Return 0 if error.

int vtkDataReader::ReadString char    result[256]
 

Internal function to read in a string up to 256 characters. Returns zero if there was an error.

vtkDataReader* vtkDataReader::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 vtkSource.

Reimplemented in vtkDataObjectReader.

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

Set the name of the field data to extract. If not specified, uses first field data encountered in file.

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

Specify file name of vtk data file to read.

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

Set the name of the ghost level data to extract. If not specified, first ghost level data encountered is extracted.

void vtkDataReader::SetInputString const char *    in
 

Specify the InputString for use when reading from a character array. Optionally include the length for binary strings.

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

Set the name of the lookup table data to extract. If not specified, uses lookup table named by scalar. Otherwise, this specification supersedes.

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

Set the name of the normal data to extract. If not specified, first normal data encountered is extracted.

virtual void vtkDataReader::SetReadFromInputString int    [virtual]
 

Enable reading from an InputString instead of the default, a file.

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

Set the name of the scalar data to extract. If not specified, first scalar data encountered is extracted.

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

Set the name of the texture coordinate data to extract. If not specified, first texture coordinate data encountered is extracted.

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

Set the name of the tensor data to extract. If not specified, first tensor data encountered is extracted.

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

Set the name of the vector data to extract. If not specified, first vector data encountered is extracted.


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