vtkMCubesReader Class Reference
#include <vtkMCubesReader.h>
Inheritance diagram for vtkMCubesReader:
[legend]Collaboration diagram for vtkMCubesReader:
[legend]List of all members.
Detailed Description
read binary marching cubes file
vtkMCubesReader is a source object that reads binary marching cubes files. (Marching cubes is an isosurfacing technique that generates many triangles.) The binary format is supported by W. Lorensen's marching cubes program (and the vtkSliceCubes object). The format repeats point coordinates, so this object will merge the points with a vtkLocator object. You can choose to supply the vtkLocator or use the default.
- Warning:
- Binary files assumed written in sun/hp/sgi (i.e., Big Endian) form.
Because points are merged when read, degenerate triangles may be removed. Thus the number of triangles read may be fewer than the number of triangles actually created.
The point merging does not take into account that the same point may have different normals. For example, running vtkPolyDataNormals after vtkContourFilter may split triangles because of the FeatureAngle ivar. Subsequent reading with vtkMCubesReader will merge the points and use the first point's normal. For the most part, this is undesirable.
Normals are generated from the gradient of the data scalar values. Hence the normals may on occasion point in a direction inconsistent with the ordering of the triangle vertices. If this happens, the resulting surface may be "black". Reverse the sense of the FlipNormals boolean flag to correct this.
- See also:
- vtkContourFilter vtkMarchingCubes vtkSliceCubes vtkLocator
- Created by:
-
- CVS contributions (if > 5%):
- Schroeder, Will (45%)
- Lorensen, Bill (21%)
- Martin, Ken (16%)
- Law, Charles (6%)
- CVS logs (CVSweb):
.h (/IO/vtkMCubesReader
.h)
.cxx (/IO/vtkMCubesReader
.cxx)
- Tests:
- vtkMCubesReader (Tests)
Definition at line 78 of file vtkMCubesReader.h.
Member Typedef Documentation
Constructor & Destructor Documentation
vtkMCubesReader::vtkMCubesReader |
( |
|
) |
[protected] |
|
Member Function Documentation
virtual const char* vtkMCubesReader::GetClassName |
( |
|
) |
[virtual] |
|
int vtkMCubesReader::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 vtkMCubesReader::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. |
void vtkMCubesReader::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. |
|
Construct object with FlipNormals turned off and Normals set to true.
Reimplemented from vtkAlgorithm. |
virtual void vtkMCubesReader::SetFileName |
( |
const char * |
|
) |
[virtual] |
|
|
Specify file name of marching cubes file. |
virtual char* vtkMCubesReader::GetFileName |
( |
|
) |
[virtual] |
|
|
Specify file name of marching cubes file. |
virtual void vtkMCubesReader::SetLimitsFileName |
( |
const char * |
|
) |
[virtual] |
|
|
Set / get the file name of the marching cubes limits file. |
virtual char* vtkMCubesReader::GetLimitsFileName |
( |
|
) |
[virtual] |
|
|
Set / get the file name of the marching cubes limits file. |
virtual void vtkMCubesReader::SetHeaderSize |
( |
int |
|
) |
[virtual] |
|
|
Specify a header size if one exists. The header is skipped and not used at this time. |
virtual int vtkMCubesReader::GetHeaderSize |
( |
|
) |
[virtual] |
|
|
Specify a header size if one exists. The header is skipped and not used at this time. |
virtual void vtkMCubesReader::SetFlipNormals |
( |
int |
|
) |
[virtual] |
|
|
Specify whether to flip normals in opposite direction. Flipping ONLY changes the direction of the normal vector. Contrast this with flipping in vtkPolyDataNormals which flips both the normal and the cell point order. |
virtual int vtkMCubesReader::GetFlipNormals |
( |
|
) |
[virtual] |
|
|
Specify whether to flip normals in opposite direction. Flipping ONLY changes the direction of the normal vector. Contrast this with flipping in vtkPolyDataNormals which flips both the normal and the cell point order. |
virtual void vtkMCubesReader::FlipNormalsOn |
( |
|
) |
[virtual] |
|
|
Specify whether to flip normals in opposite direction. Flipping ONLY changes the direction of the normal vector. Contrast this with flipping in vtkPolyDataNormals which flips both the normal and the cell point order. |
virtual void vtkMCubesReader::FlipNormalsOff |
( |
|
) |
[virtual] |
|
|
Specify whether to flip normals in opposite direction. Flipping ONLY changes the direction of the normal vector. Contrast this with flipping in vtkPolyDataNormals which flips both the normal and the cell point order. |
virtual void vtkMCubesReader::SetNormals |
( |
int |
|
) |
[virtual] |
|
|
Specify whether to read normals. |
virtual int vtkMCubesReader::GetNormals |
( |
|
) |
[virtual] |
|
|
Specify whether to read normals. |
virtual void vtkMCubesReader::NormalsOn |
( |
|
) |
[virtual] |
|
|
Specify whether to read normals. |
virtual void vtkMCubesReader::NormalsOff |
( |
|
) |
[virtual] |
|
|
Specify whether to read normals. |
void vtkMCubesReader::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 vtkMCubesReader::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 vtkMCubesReader::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 vtkMCubesReader::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* vtkMCubesReader::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 vtkMCubesReader::SetSwapBytes |
( |
int |
|
) |
[virtual] |
|
|
Turn on/off byte swapping. |
virtual int vtkMCubesReader::GetSwapBytes |
( |
|
) |
[virtual] |
|
|
Turn on/off byte swapping. |
virtual void vtkMCubesReader::SwapBytesOn |
( |
|
) |
[virtual] |
|
|
Turn on/off byte swapping. |
virtual void vtkMCubesReader::SwapBytesOff |
( |
|
) |
[virtual] |
|
|
Turn on/off byte swapping. |
|
Set / get a spatial locator for merging points. By default, an instance of vtkMergePoints is used. |
|
Set / get a spatial locator for merging points. By default, an instance of vtkMergePoints is used. |
void vtkMCubesReader::CreateDefaultLocator |
( |
|
) |
|
|
|
Create default locator. Used to create one when none is specified. |
unsigned long vtkMCubesReader::GetMTime |
( |
|
) |
[virtual] |
|
|
Return the mtime also considering the locator.
Reimplemented from vtkObject. |
void vtkMCubesReader::Execute |
( |
|
) |
[protected, virtual] |
|
|
This method is the old style execute method
Reimplemented from vtkSource. |
Member Data Documentation
The documentation for this class was generated from the following file: