Section: Visualization Toolkit IO Classes
To create an instance of class vtkParticleReader, simply invoke its constructor as follows
obj = vtkParticleReader
obj
is an instance of the vtkParticleReader class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkParticleReader = obj.NewInstance ()
vtkParticleReader = obj.SafeDownCast (vtkObject o)
obj.SetFileName (string )
- Specify file name.
string = obj.GetFileName ()
- Specify file name.
obj.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.
obj.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 = obj.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.
obj.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.
string = obj.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.
obj.SetSwapBytes (int )
- Set/Get the byte swapping to explicitly swap the bytes of a file.
Not used when reading text files.
int = obj.GetSwapBytes ()
- Set/Get the byte swapping to explicitly swap the bytes of a file.
Not used when reading text files.
obj.SwapBytesOn ()
- Set/Get the byte swapping to explicitly swap the bytes of a file.
Not used when reading text files.
obj.SwapBytesOff ()
- Set/Get the byte swapping to explicitly swap the bytes of a file.
Not used when reading text files.
obj.SetHasScalar (int )
- Default: 1. If 1 then each particle has a value associated with it.
int = obj.GetHasScalar ()
- Default: 1. If 1 then each particle has a value associated with it.
obj.HasScalarOn ()
- Default: 1. If 1 then each particle has a value associated with it.
obj.HasScalarOff ()
- Default: 1. If 1 then each particle has a value associated with it.
obj.SetFileType (int )
- 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.
int = obj.GetFileTypeMinValue ()
- 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.
int = obj.GetFileTypeMaxValue ()
- 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.
int = obj.GetFileType ()
- 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.
obj.SetFileTypeToUnknown ()
- 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.
obj.SetFileTypeToText ()
- 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.
obj.SetFileTypeToBinary ()
- Get/Set the data type. The options are:
- VTK_FLOAT (default) single precision floating point.
- VTK_DOUBLE double precision floating point.
obj.SetDataType (int )
- Get/Set the data type. The options are:
- VTK_FLOAT (default) single precision floating point.
- VTK_DOUBLE double precision floating point.
int = obj.GetDataTypeMinValue ()
- Get/Set the data type. The options are:
- VTK_FLOAT (default) single precision floating point.
- VTK_DOUBLE double precision floating point.
int = obj.GetDataTypeMaxValue ()
- Get/Set the data type. The options are:
- VTK_FLOAT (default) single precision floating point.
- VTK_DOUBLE double precision floating point.
int = obj.GetDataType ()
- Get/Set the data type. The options are:
- VTK_FLOAT (default) single precision floating point.
- VTK_DOUBLE double precision floating point.
obj.SetDataTypeToFloat ()
- Get/Set the data type. The options are:
- VTK_FLOAT (default) single precision floating point.
- VTK_DOUBLE double precision floating point.
obj.SetDataTypeToDouble ()