Man Page for vtkMCubesReader
Table of Contents

NAME

vtkMCubesReader - read binary marching cubes file

SYNOPSIS


#include "/opt/vtk-c++/graphics/vtkMCubesReader.h"

class VTK_EXPORT vtkMCubesReader : public vtkPolyDataSource

vtkMCubesReader();
~vtkMCubesReader();
static vtkMCubesReader *New() {return new vtkMCubesReader;};
const char *GetClassName() {return "vtkMCubesReader";};
void PrintSelf(ostream& os, vtkIndent indent);
void SetFileName(char *);
char *GetFileName();
void SetLimitsFileName(char *);
char *GetLimitsFileName();
void SetFlipNormals(int);
int GetFlipNormals();
void FlipNormalsOn();
void FlipNormalsOff();
void SetNormals(int);
int GetNormals();
void NormalsOn();
void NormalsOff();
void SetLocator(vtkPointLocator *locator);
void SetLocator(vtkPointLocator& locator) {this->SetLocator(&locator);};
vtkPointLocator *GetLocator();
void CreateDefaultLocator();

DESCRIPTION

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.

CAVEATS

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

SUMMARY

void SetFileName(char *)
Specify file name of marching cubes file.

void SetLimitsFileName(char *)
Specify file name of marching cubes limits file.

void SetFlipNormals(int)
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.

void SetNormals(int)
Specify whether to read normals.

vtkMCubesReader()
Construct object with FlipNormals turned off and Normals set to true.

void SetLocator(vtkPointLocator *locator)
Specify a spatial locator for merging points. By default, an instance of vtkMergePoints is used.


Table of Contents