VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkParticleReader Class Reference

Read ASCII or binary particle data and (optionally) one scalar value associated with each particle. More...

#include <vtkParticleReader.h>

Inheritance diagram for vtkParticleReader:
[legend]
Collaboration diagram for vtkParticleReader:
[legend]

Public Types

typedef vtkPolyDataAlgorithm Superclass
 
- Public Types inherited from vtkPolyDataAlgorithm
typedef vtkAlgorithm Superclass
 
- Public Types inherited from vtkAlgorithm
typedef vtkObject Superclass
 
enum  DesiredOutputPrecision { SINGLE_PRECISION, DOUBLE_PRECISION, DEFAULT_PRECISION }
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkParticleReaderNewInstance () const
 
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 ()
 
virtual void SetHasScalar (int)
 
virtual int GetHasScalar ()
 
virtual void HasScalarOn ()
 
virtual void HasScalarOff ()
 
virtual void SetFileType (int)
 
virtual int GetFileType ()
 
void SetFileTypeToUnknown ()
 
void SetFileTypeToText ()
 
void SetFileTypeToBinary ()
 
virtual void SetDataType (int)
 
virtual int GetDataType ()
 
void SetDataTypeToFloat ()
 
void SetDataTypeToDouble ()
 
- Public Member Functions inherited from vtkPolyDataAlgorithm
vtkPolyDataAlgorithmNewInstance () const
 
vtkDataObjectGetInput ()
 
vtkDataObjectGetInput (int port)
 
vtkPolyDataGetPolyDataInput (int port)
 
vtkPolyDataGetOutput ()
 
vtkPolyDataGetOutput (int)
 
virtual void SetOutput (vtkDataObject *d)
 
virtual int ProcessRequest (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
void SetInputData (vtkDataObject *)
 
void SetInputData (int, vtkDataObject *)
 
void AddInputData (vtkDataObject *)
 
void AddInputData (int, vtkDataObject *)
 
- Public Member Functions inherited from vtkAlgorithm
vtkAlgorithmNewInstance () const
 
int HasExecutive ()
 
vtkExecutiveGetExecutive ()
 
virtual void SetExecutive (vtkExecutive *executive)
 
virtual int ModifyRequest (vtkInformation *request, int when)
 
vtkInformationGetInputPortInformation (int port)
 
vtkInformationGetOutputPortInformation (int port)
 
int GetNumberOfInputPorts ()
 
int GetNumberOfOutputPorts ()
 
void UpdateProgress (double amount)
 
vtkInformationGetInputArrayInformation (int idx)
 
void RemoveAllInputs ()
 
vtkDataObjectGetOutputDataObject (int port)
 
virtual void RemoveInputConnection (int port, vtkAlgorithmOutput *input)
 
virtual void RemoveInputConnection (int port, int idx)
 
virtual void RemoveAllInputConnections (int port)
 
int GetNumberOfInputConnections (int port)
 
int GetTotalNumberOfInputConnections ()
 
vtkAlgorithmOutputGetInputConnection (int port, int index)
 
vtkAlgorithmGetInputAlgorithm (int port, int index, int &algPort)
 
vtkAlgorithmGetInputAlgorithm (int port, int index)
 
vtkExecutiveGetInputExecutive (int port, int index)
 
vtkInformationGetInputInformation (int port, int index)
 
vtkInformationGetOutputInformation (int port)
 
virtual void UpdateInformation ()
 
virtual void UpdateDataObject ()
 
virtual void PropagateUpdateExtent ()
 
virtual void UpdateWholeExtent ()
 
void ConvertTotalInputToPortConnection (int ind, int &port, int &conn)
 
int SetUpdateExtentToWholeExtent (int port)
 
int SetUpdateExtentToWholeExtent ()
 
void SetUpdateExtent (int port, int extent[6])
 
int ProcessRequest (vtkInformation *request, vtkCollection *inInfo, vtkInformationVector *outInfo)
 
virtual int ComputePipelineMTime (vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int requestFromOutputPort, unsigned long *mtime)
 
virtual vtkInformationGetInformation ()
 
virtual void SetInformation (vtkInformation *)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
virtual void SetAbortExecute (int)
 
virtual int GetAbortExecute ()
 
virtual void AbortExecuteOn ()
 
virtual void AbortExecuteOff ()
 
virtual void SetProgress (double)
 
virtual double GetProgress ()
 
void SetProgressText (const char *ptext)
 
virtual char * GetProgressText ()
 
virtual unsigned long GetErrorCode ()
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, int fieldAssociation, const char *name)
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, int fieldAssociation, int fieldAttributeType)
 
virtual void SetInputArrayToProcess (int idx, vtkInformation *info)
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, const char *fieldAssociation, const char *attributeTypeorName)
 
vtkDataObjectGetInputDataObject (int port, int connection)
 
virtual void SetInputConnection (int port, vtkAlgorithmOutput *input)
 
virtual void SetInputConnection (vtkAlgorithmOutput *input)
 
virtual void AddInputConnection (int port, vtkAlgorithmOutput *input)
 
virtual void AddInputConnection (vtkAlgorithmOutput *input)
 
virtual void SetInputDataObject (int port, vtkDataObject *data)
 
virtual void SetInputDataObject (vtkDataObject *data)
 
virtual void AddInputDataObject (int port, vtkDataObject *data)
 
virtual void AddInputDataObject (vtkDataObject *data)
 
vtkAlgorithmOutputGetOutputPort (int index)
 
vtkAlgorithmOutputGetOutputPort ()
 
vtkAlgorithmGetInputAlgorithm ()
 
vtkExecutiveGetInputExecutive ()
 
vtkInformationGetInputInformation ()
 
virtual void Update (int port)
 
virtual void Update ()
 
virtual void SetReleaseDataFlag (int)
 
virtual int GetReleaseDataFlag ()
 
void ReleaseDataFlagOn ()
 
void ReleaseDataFlagOff ()
 
int UpdateExtentIsEmpty (vtkInformation *pinfo, vtkDataObject *output)
 
int UpdateExtentIsEmpty (vtkInformation *pinfo, int extentType)
 
void SetUpdateExtent (int port, int piece, int numPieces, int ghostLevel)
 
void SetUpdateExtent (int piece, int numPieces, int ghostLevel)
 
void SetUpdateExtent (int extent[6])
 
intGetUpdateExtent ()
 
intGetUpdateExtent (int port)
 
void GetUpdateExtent (int &x0, int &x1, int &y0, int &y1, int &z0, int &z1)
 
void GetUpdateExtent (int port, int &x0, int &x1, int &y0, int &y1, int &z0, int &z1)
 
void GetUpdateExtent (int extent[6])
 
void GetUpdateExtent (int port, int extent[6])
 
int GetUpdatePiece ()
 
int GetUpdatePiece (int port)
 
int GetUpdateNumberOfPieces ()
 
int GetUpdateNumberOfPieces (int port)
 
int GetUpdateGhostLevel ()
 
int GetUpdateGhostLevel (int port)
 
void SetProgressObserver (vtkProgressObserver *)
 
virtual vtkProgressObserverGetProgressObserver ()
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static vtkParticleReaderNew ()
 
static int IsTypeOf (const char *type)
 
static vtkParticleReaderSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkPolyDataAlgorithm
static vtkPolyDataAlgorithmNew ()
 
static int IsTypeOf (const char *type)
 
static vtkPolyDataAlgorithmSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkAlgorithm
static vtkAlgorithmNew ()
 
static int IsTypeOf (const char *type)
 
static vtkAlgorithmSafeDownCast (vtkObjectBase *o)
 
static vtkInformationIntegerKeyINPUT_IS_OPTIONAL ()
 
static vtkInformationIntegerKeyINPUT_IS_REPEATABLE ()
 
static vtkInformationInformationVectorKeyINPUT_REQUIRED_FIELDS ()
 
static vtkInformationStringVectorKeyINPUT_REQUIRED_DATA_TYPE ()
 
static vtkInformationInformationVectorKeyINPUT_ARRAYS_TO_PROCESS ()
 
static vtkInformationIntegerKeyINPUT_PORT ()
 
static vtkInformationIntegerKeyINPUT_CONNECTION ()
 
static vtkInformationIntegerKeyCAN_PRODUCE_SUB_EXTENT ()
 
static vtkInformationIntegerKeyCAN_HANDLE_PIECE_REQUEST ()
 
static void SetDefaultExecutivePrototype (vtkExecutive *proto)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Types

enum  FILE_TYPE { FILE_TYPE_IS_UNKNOWN = 0, FILE_TYPE_IS_TEXT, FILE_TYPE_IS_BINARY }
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkParticleReader ()
 
 ~vtkParticleReader ()
 
void OpenFile ()
 
int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
int DetermineFileType ()
 
void DoProgressUpdate (size_t &bytesRead, size_t &fileLength)
 
int ProduceOutputFromTextFileDouble (vtkInformationVector *outputVector)
 
int ProduceOutputFromTextFileFloat (vtkInformationVector *outputVector)
 
int ProduceOutputFromBinaryFileDouble (vtkInformationVector *outputVector)
 
int ProduceOutputFromBinaryFileFloat (vtkInformationVector *outputVector)
 
- Protected Member Functions inherited from vtkPolyDataAlgorithm
 vtkPolyDataAlgorithm ()
 
 ~vtkPolyDataAlgorithm ()
 
virtual int FillOutputPortInformation (int port, vtkInformation *info)
 
virtual int FillInputPortInformation (int port, vtkInformation *info)
 
virtual int RequestUpdateExtent (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
- Protected Member Functions inherited from vtkAlgorithm
 vtkAlgorithm ()
 
 ~vtkAlgorithm ()
 
virtual void SetNumberOfInputPorts (int n)
 
virtual void SetNumberOfOutputPorts (int n)
 
int InputPortIndexInRange (int index, const char *action)
 
int OutputPortIndexInRange (int index, const char *action)
 
int GetInputArrayAssociation (int idx, vtkInformationVector **inputVector)
 
virtual vtkExecutiveCreateDefaultExecutive ()
 
virtual void ReportReferences (vtkGarbageCollector *)
 
virtual void SetNumberOfInputConnections (int port, int n)
 
int GetInputArrayAssociation (int idx, int connection, vtkInformationVector **inputVector)
 
int GetInputArrayAssociation (int idx, vtkDataObject *input)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkInformationVector **inputVector)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkInformationVector **inputVector, int &association)
 
vtkDataArrayGetInputArrayToProcess (int idx, int connection, vtkInformationVector **inputVector)
 
vtkDataArrayGetInputArrayToProcess (int idx, int connection, vtkInformationVector **inputVector, int &association)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkDataObject *input)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkDataObject *input, int &association)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkInformationVector **inputVector)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkInformationVector **inputVector, int &association)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, int connection, vtkInformationVector **inputVector)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, int connection, vtkInformationVector **inputVector, int &association)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkDataObject *input)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkDataObject *input, int &association)
 
vtkInformationGetInputArrayFieldInformation (int idx, vtkInformationVector **inputVector)
 
virtual void SetNthInputConnection (int port, int index, vtkAlgorithmOutput *input)
 
void SetInputDataInternal (int port, vtkDataObject *input)
 
void AddInputDataInternal (int port, vtkDataObject *input)
 
virtual void SetErrorCode (unsigned long)
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

char * FileName
 
ifstream * File
 
int HasScalar
 
int FileType
 
int DataType
 
size_t Alliquot
 
size_t Count
 
int SwapBytes
 
size_t NumberOfPoints
 
- Protected Attributes inherited from vtkAlgorithm
vtkInformationInformation
 
double Progress
 
char * ProgressText
 
vtkProgressObserverProgressObserver
 
unsigned long ErrorCode
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Additional Inherited Members

- Public Attributes inherited from vtkAlgorithm
int AbortExecute
 
- Static Protected Member Functions inherited from vtkAlgorithm
static vtkInformationIntegerKeyPORT_REQUIREMENTS_FILLED ()
 
- Static Protected Attributes inherited from vtkAlgorithm
static vtkExecutiveDefaultExecutivePrototype
 

Detailed Description

Read ASCII or binary particle data and (optionally) one scalar value associated with each particle.

vtkParticleReader reads either a binary or a text file of particles. Each particle can have associated with it an optional scalar value. So the format is: x, y, z, scalar (all floats or doubles). The text file can consist of a comma delimited set of values. In most cases vtkParticleReader can automatically determine whether the file is text or binary. The data can be either float or double. Progress updates are provided. With respect to binary files, random access into the file to read pieces is supported.

Examples:
vtkParticleReader (Examples)
Tests:
vtkParticleReader (Tests)

Definition at line 49 of file vtkParticleReader.h.

Member Typedef Documentation

Definition at line 53 of file vtkParticleReader.h.

Member Enumeration Documentation

Enumerate the supported file types.

 - FILE_TYPE_IS_UNKNOWN,
(default) the class will attempt to determine the file type. -
FILE_TYPE_IS_TEXT, the file type is text. - FILE_TYPE_IS_BINARY, the
file type is binary. 
Enumerator
FILE_TYPE_IS_UNKNOWN 
FILE_TYPE_IS_TEXT 
FILE_TYPE_IS_BINARY 

Definition at line 171 of file vtkParticleReader.h.

Constructor & Destructor Documentation

vtkParticleReader::vtkParticleReader ( )
protected
vtkParticleReader::~vtkParticleReader ( )
protected

Member Function Documentation

static vtkParticleReader* vtkParticleReader::New ( )
static
static int vtkParticleReader::IsTypeOf ( const char *  type)
static
virtual int vtkParticleReader::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 vtkPolyDataAlgorithm.

static vtkParticleReader* vtkParticleReader::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkParticleReader::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkPolyDataAlgorithm.

vtkParticleReader* vtkParticleReader::NewInstance ( ) const
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 vtkPolyDataAlgorithm.

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. Not used when reading text files.

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. Not used when reading text files.

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. Not used when reading text files.

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. Not used when reading text files.

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. Not used when reading text files.

virtual void vtkParticleReader::SetSwapBytes ( int  )
virtual

Set/Get the byte swapping to explicitly swap the bytes of a file. Not used when reading text files.

int vtkParticleReader::GetSwapBytes ( )
inline

Set/Get the byte swapping to explicitly swap the bytes of a file. Not used when reading text files.

Definition at line 85 of file vtkParticleReader.h.

virtual void vtkParticleReader::SwapBytesOn ( )
virtual

Set/Get the byte swapping to explicitly swap the bytes of a file. Not used when reading text files.

virtual void vtkParticleReader::SwapBytesOff ( )
virtual

Set/Get the byte swapping to explicitly swap the bytes of a file. Not used when reading text files.

virtual void vtkParticleReader::SetHasScalar ( int  )
virtual

Default: 1. If 1 then each particle has a value associated with it.

virtual int vtkParticleReader::GetHasScalar ( )
virtual

Default: 1. If 1 then each particle has a value associated with it.

virtual void vtkParticleReader::HasScalarOn ( )
virtual

Default: 1. If 1 then each particle has a value associated with it.

virtual void vtkParticleReader::HasScalarOff ( )
virtual

Default: 1. If 1 then each particle has a value associated with it.

virtual void vtkParticleReader::SetFileType ( int  )
virtual

Get/Set the file type. The options are: - FILE_TYPE_IS_UNKNOWN (default) the class will attempt to determine the file type. If this fails then you should set the file type yourself. - FILE_TYPE_IS_TEXT the file type is text. - FILE_TYPE_IS_BINARY the file type is binary.

virtual int vtkParticleReader::GetFileType ( )
virtual

Get/Set the file type. The options are: - FILE_TYPE_IS_UNKNOWN (default) the class will attempt to determine the file type. If this fails then you should set the file type yourself. - FILE_TYPE_IS_TEXT the file type is text. - FILE_TYPE_IS_BINARY the file type is binary.

void vtkParticleReader::SetFileTypeToUnknown ( )
inline

Get/Set the file type. The options are: - FILE_TYPE_IS_UNKNOWN (default) the class will attempt to determine the file type. If this fails then you should set the file type yourself. - FILE_TYPE_IS_TEXT the file type is text. - FILE_TYPE_IS_BINARY the file type is binary.

Definition at line 103 of file vtkParticleReader.h.

void vtkParticleReader::SetFileTypeToText ( )
inline

Get/Set the file type. The options are: - FILE_TYPE_IS_UNKNOWN (default) the class will attempt to determine the file type. If this fails then you should set the file type yourself. - FILE_TYPE_IS_TEXT the file type is text. - FILE_TYPE_IS_BINARY the file type is binary.

Definition at line 104 of file vtkParticleReader.h.

void vtkParticleReader::SetFileTypeToBinary ( )
inline

Get/Set the file type. The options are: - FILE_TYPE_IS_UNKNOWN (default) the class will attempt to determine the file type. If this fails then you should set the file type yourself. - FILE_TYPE_IS_TEXT the file type is text. - FILE_TYPE_IS_BINARY the file type is binary.

Definition at line 105 of file vtkParticleReader.h.

virtual void vtkParticleReader::SetDataType ( int  )
virtual

Get/Set the data type. The options are: - VTK_FLOAT (default) single precision floating point. - VTK_DOUBLE double precision floating point.

virtual int vtkParticleReader::GetDataType ( )
virtual

Get/Set the data type. The options are: - VTK_FLOAT (default) single precision floating point. - VTK_DOUBLE double precision floating point.

void vtkParticleReader::SetDataTypeToFloat ( )
inline

Get/Set the data type. The options are: - VTK_FLOAT (default) single precision floating point. - VTK_DOUBLE double precision floating point.

Definition at line 114 of file vtkParticleReader.h.

void vtkParticleReader::SetDataTypeToDouble ( )
inline

Get/Set the data type. The options are: - VTK_FLOAT (default) single precision floating point. - VTK_DOUBLE double precision floating point.

Definition at line 115 of file vtkParticleReader.h.

void vtkParticleReader::OpenFile ( )
protected
int vtkParticleReader::RequestInformation ( vtkInformation ,
vtkInformationVector **  ,
vtkInformationVector  
)
protectedvirtual

Reimplemented from vtkPolyDataAlgorithm.

int vtkParticleReader::RequestData ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
)
protectedvirtual

This is called by the superclass. This is the method you should override.

Reimplemented from vtkPolyDataAlgorithm.

int vtkParticleReader::ProduceOutputFromTextFileDouble ( vtkInformationVector outputVector)
protected

The format that will be read if the file is a text file is: x, y, z, s (where s is some scalar value associated with the particle). Each line corresponding to a particle is terminated with a line feed. If y, z, or s is missing, zero is substituted for them. Comment lines in the file are handled as follows: 1) Any line containing "\/\/" "\#" "\%" anywhere in the line is discarded. 2) Lines containing "\/\*" are discarded until a "\*\/" is found. The line following the "\*\/" will be read.

int vtkParticleReader::ProduceOutputFromTextFileFloat ( vtkInformationVector outputVector)
protected

The format that will be read if the file is a text file is: x, y, z, s (where s is some scalar value associated with the particle). Each line corresponding to a particle is terminated with a line feed. If y, z, or s is missing, zero is substituted for them. Comment lines in the file are handled as follows: 1) Any line containing "\/\/" "\#" "\%" anywhere in the line is discarded. 2) Lines containing "\/\*" are discarded until a "\*\/" is found. The line following the "\*\/" will be read.

int vtkParticleReader::ProduceOutputFromBinaryFileDouble ( vtkInformationVector outputVector)
protected

This reader assumes that the file is binary and consists of floating point values by default.

int vtkParticleReader::ProduceOutputFromBinaryFileFloat ( vtkInformationVector outputVector)
protected

This reader assumes that the file is binary and consists of floating point values by default.

int vtkParticleReader::DetermineFileType ( )
protected

Determine the type of file based on an analysis of its contents. Up to 5000 bytes of the file are read and classified. The classification of a file as either binary or text is based on the proportions of bytes in various classifications. The classification of the file is not infallible but should work correctly most of the time. If it fails, use SetFileTypeToText() or SetFileTypeToBinary() to set the file type. This algorithm probably only identifies ASCII text correctly and will not work for UTF-8 UCS-2 (or UTF-16) or UCS-4 or EBCIDIC.

void vtkParticleReader::DoProgressUpdate ( size_t &  bytesRead,
size_t &  fileLength 
)
protected

Update of the progress.

Member Data Documentation

char* vtkParticleReader::FileName
protected

Definition at line 125 of file vtkParticleReader.h.

ifstream* vtkParticleReader::File
protected

Definition at line 126 of file vtkParticleReader.h.

int vtkParticleReader::HasScalar
protected

Definition at line 176 of file vtkParticleReader.h.

int vtkParticleReader::FileType
protected

Used to decide which reader should be used.

Definition at line 178 of file vtkParticleReader.h.

int vtkParticleReader::DataType
protected

Used to specify the data type.

Definition at line 180 of file vtkParticleReader.h.

size_t vtkParticleReader::Alliquot
protected

Set an alliquot of bytes.

Definition at line 183 of file vtkParticleReader.h.

size_t vtkParticleReader::Count
protected

Count of the number of alliquots processed.

Definition at line 185 of file vtkParticleReader.h.

int vtkParticleReader::SwapBytes
protected

Definition at line 187 of file vtkParticleReader.h.

size_t vtkParticleReader::NumberOfPoints
protected

Definition at line 188 of file vtkParticleReader.h.


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