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

vtkParticleReader Class Reference

Read raw particle data and one array. More...

#include <vtkParticleReader.h>

Inheritance diagram for vtkParticleReader:

Inheritance graph
[legend]
Collaboration diagram for vtkParticleReader:

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 ()
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 Methods

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

Protected Methods

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

Protected Attributes

char * FileName
ifstream * File
int SwapBytes
unsigned long NumberOfPoints

Detailed Description

Read raw particle data and one array.

Date:
2001/10/11 13:37:32
Revision:
1.3

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.

Tests:
vtkParticleReader (Tests)

Definition at line 66 of file vtkParticleReader.h.


Constructor & Destructor Documentation

vtkParticleReader::vtkParticleReader   [protected]
 

vtkParticleReader::~vtkParticleReader   [protected]
 


Member Function Documentation

vtkParticleReader* vtkParticleReader::New   [static]
 

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

Reimplemented from vtkPolyDataSource.

virtual const char* vtkParticleReader::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 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 vtkTypeMacro 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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataSource.

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

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 100 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 110 of file vtkParticleReader.h.

ifstream* vtkParticleReader::File [protected]
 

Definition at line 111 of file vtkParticleReader.h.

int vtkParticleReader::SwapBytes [protected]
 

Definition at line 112 of file vtkParticleReader.h.

unsigned long vtkParticleReader::NumberOfPoints [protected]
 

Definition at line 114 of file vtkParticleReader.h.


The documentation for this class was generated from the following file:
Generated on Thu Mar 28 14:38:39 2002 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001