Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkParticleReader Class Reference

#include <vtkParticleReader.h>

Inheritance diagram for vtkParticleReader:

Inheritance graph
[legend]
Collaboration diagram for vtkParticleReader:

Collaboration graph
[legend]
List of all members.

Detailed Description

Read raw particle data and one array.

vtkParticleReader reads a raw file with particles. It supports random access into the file to read pieces. The format is: x, y, z, value (all floats). This class was developed with a specific file in mind, but may be made more general in the future. Here are a couple of features I am considering: any data types could be used, arbitrary list of arrays to read (extended to vectors as well), and time serries based on file names.

Created by:
  • Law, Charles
CVS contributions (if > 5%):
  • Law, Charles (85%)
  • Cedilnik, Andy (7%)
CVS logs (CVSweb):
  • .h (/IO/vtkParticleReader.h)
  • .cxx (/IO/vtkParticleReader.cxx)
Tests:
vtkParticleReader (Tests)

Definition at line 50 of file vtkParticleReader.h.

Public Types

typedef vtkPolyDataSource Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetFileName (const char *)
virtual char * GetFileName ()
void SetDataByteOrderToBigEndian ()
void SetDataByteOrderToLittleEndian ()
int GetDataByteOrder ()
void SetDataByteOrder (int)
const char * GetDataByteOrderAsString ()
virtual void SetSwapBytes (int)
int GetSwapBytes ()
virtual void SwapBytesOn ()
virtual void SwapBytesOff ()

Static Public Member Functions

vtkParticleReaderNew ()
int IsTypeOf (const char *type)
vtkParticleReaderSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkParticleReader ()
 ~vtkParticleReader ()
void OpenFile ()
void ExecuteInformation ()
void Execute ()

Protected Attributes

char * FileName
ifstream * File
int SwapBytes
unsigned long NumberOfPoints


Member Typedef Documentation

typedef vtkPolyDataSource vtkParticleReader::Superclass
 

Reimplemented from vtkPolyDataSource.

Definition at line 54 of file vtkParticleReader.h.


Constructor & Destructor Documentation

vtkParticleReader::vtkParticleReader  )  [protected]
 

vtkParticleReader::~vtkParticleReader  )  [protected]
 


Member Function Documentation

vtkParticleReader* vtkParticleReader::New  )  [static]
 

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkAlgorithm.

virtual const char* vtkParticleReader::GetClassName  )  [virtual]
 

Reimplemented from vtkPolyDataSource.

int vtkParticleReader::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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataSource.

virtual int vtkParticleReader::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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataSource.

vtkParticleReader* vtkParticleReader::SafeDownCast vtkObject o  )  [static]
 

Reimplemented from vtkPolyDataSource.

void vtkParticleReader::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 vtkPolyDataSource.

virtual void vtkParticleReader::SetFileName const char *   )  [virtual]
 

Specify file name.

virtual char* vtkParticleReader::GetFileName  )  [virtual]
 

Specify file name.

void vtkParticleReader::SetDataByteOrderToBigEndian  ) 
 

These methods should be used instead of the SwapBytes methods. They indicate the byte ordering of the file you are trying to read in. These methods will then either swap or not swap the bytes depending on the byte ordering of the machine it is being run on. For example, reading in a BigEndian file on a BigEndian machine will result in no swapping. Trying to read the same file on a LittleEndian machine will result in swapping. As a quick note most UNIX machines are BigEndian while PC's and VAX tend to be LittleEndian. So if the file you are reading in was generated on a VAX or PC, SetDataByteOrderToLittleEndian otherwise SetDataByteOrderToBigEndian.

void vtkParticleReader::SetDataByteOrderToLittleEndian  ) 
 

These methods should be used instead of the SwapBytes methods. They indicate the byte ordering of the file you are trying to read in. These methods will then either swap or not swap the bytes depending on the byte ordering of the machine it is being run on. For example, reading in a BigEndian file on a BigEndian machine will result in no swapping. Trying to read the same file on a LittleEndian machine will result in swapping. As a quick note most UNIX machines are BigEndian while PC's and VAX tend to be LittleEndian. So if the file you are reading in was generated on a VAX or PC, SetDataByteOrderToLittleEndian otherwise SetDataByteOrderToBigEndian.

int vtkParticleReader::GetDataByteOrder  ) 
 

These methods should be used instead of the SwapBytes methods. They indicate the byte ordering of the file you are trying to read in. These methods will then either swap or not swap the bytes depending on the byte ordering of the machine it is being run on. For example, reading in a BigEndian file on a BigEndian machine will result in no swapping. Trying to read the same file on a LittleEndian machine will result in swapping. As a quick note most UNIX machines are BigEndian while PC's and VAX tend to be LittleEndian. So if the file you are reading in was generated on a VAX or PC, SetDataByteOrderToLittleEndian otherwise SetDataByteOrderToBigEndian.

void vtkParticleReader::SetDataByteOrder int   ) 
 

These methods should be used instead of the SwapBytes methods. They indicate the byte ordering of the file you are trying to read in. These methods will then either swap or not swap the bytes depending on the byte ordering of the machine it is being run on. For example, reading in a BigEndian file on a BigEndian machine will result in no swapping. Trying to read the same file on a LittleEndian machine will result in swapping. As a quick note most UNIX machines are BigEndian while PC's and VAX tend to be LittleEndian. So if the file you are reading in was generated on a VAX or PC, SetDataByteOrderToLittleEndian otherwise SetDataByteOrderToBigEndian.

const char* vtkParticleReader::GetDataByteOrderAsString  ) 
 

These methods should be used instead of the SwapBytes methods. They indicate the byte ordering of the file you are trying to read in. These methods will then either swap or not swap the bytes depending on the byte ordering of the machine it is being run on. For example, reading in a BigEndian file on a BigEndian machine will result in no swapping. Trying to read the same file on a LittleEndian machine will result in swapping. As a quick note most UNIX machines are BigEndian while PC's and VAX tend to be LittleEndian. So if the file you are reading in was generated on a VAX or PC, SetDataByteOrderToLittleEndian otherwise SetDataByteOrderToBigEndian.

virtual void vtkParticleReader::SetSwapBytes int   )  [virtual]
 

Set/Get the byte swapping to explicitly swap the bytes of a file.

int vtkParticleReader::GetSwapBytes  )  [inline]
 

Set/Get the byte swapping to explicitly swap the bytes of a file.

Definition at line 84 of file vtkParticleReader.h.

virtual void vtkParticleReader::SwapBytesOn  )  [virtual]
 

Set/Get the byte swapping to explicitly swap the bytes of a file.

virtual void vtkParticleReader::SwapBytesOff  )  [virtual]
 

Set/Get the byte swapping to explicitly swap the bytes of a file.

void vtkParticleReader::OpenFile  )  [protected]
 

void vtkParticleReader::ExecuteInformation  )  [protected, virtual]
 

Reimplemented from vtkSource.

void vtkParticleReader::Execute  )  [protected, virtual]
 

This method is the old style execute method

Reimplemented from vtkSource.


Member Data Documentation

char* vtkParticleReader::FileName [protected]
 

Definition at line 94 of file vtkParticleReader.h.

ifstream* vtkParticleReader::File [protected]
 

Definition at line 95 of file vtkParticleReader.h.

int vtkParticleReader::SwapBytes [protected]
 

Definition at line 96 of file vtkParticleReader.h.

unsigned long vtkParticleReader::NumberOfPoints [protected]
 

Definition at line 98 of file vtkParticleReader.h.


The documentation for this class was generated from the following file: