Previous

Section

<<<

Isosurface Generation Using VTK

Next

Section

>>>

VTK Basics

 

 

3.5.1.3. Creating the Pipeline: vtkMarchingCubes / vtkContourFitler

 

You are here:

  • This pipeline will take input from a file with volumetric data which has dimensions of 256x256x577 with individual unsigned 16-bit units.  Because of the inherent flaws with the technology used to generate this data, it is necessary to extract a region that does not show the machine or table used to generate this data.  Also, it will be useful to select a range of slices to view at one time instead of the entire body.  For performance reasons, the data should be able to be subsampled to achieve better interactive performance.  Additionally, it would be nice to view any single region of the entire dataset.  This volumetric data should be viewable using any isosurface value.  So, once the region of interest is extracted, a specific isosurface value of the dataset should be chosen to view.  By itself, this isosurface will be invisible unless some additional configuration occurs.  For this reason, the user should be able to choose any color and amount of opacity of the surface.  In order to get better interactive performance when manipulating the model, it might be helpful to have the model have a lower level of details.

 

The pipeline so far is:

  • vtkImageReader -> vtkExtractVOI

 

Studying the highlighted section:

·        “This volumetric data should be viewable using any isosurface value.  So, once the region of interest is extracted, a specific isosurface value of the dataset should be chosen to view.”

o       To generate this data, it is necessary to pick an isosurface value in order to view a particular surface.  From the author’s experience using the Visible Woman dataset, skin can have a value around 860, some muscles can have of 1100, and bone can have a value around 1250.  One of two VTK classes may be used which is either vtkMarchingCubes or vtkContourFitler.  As stated before, if a programmer has access to the Patented binaries with Python wrappings, it will be more preferable to use vtkMarchingCubes.  With either choice, the same calls will be made. 

§         The only crucial configuration call to make is to SetValue( int i, float value ).  Since there is only one surface that will be generated per actor, set i as 0 and value as 860, 1100, 1250, or whatever value you may want.

§         If it is possible to spare the extra rendering cycles, it might be nice to compute normals in order to make the isosurface look more realistic and pleasant, so call this function: ComputeNormalsOn().

 

In order to add this object to the pipeline, issue a form of the following command:

  • vtkMarchingCubesObject.SetInput( vtkExtractVOIObject.GetOutput() )

 

 

<<< Previous

Creating the Pipeline: vtkExtractVOI

 

Table of Contents

 

<<< Next

Creating the Pipeline: vtkPolyDataMapper and vtkLODActor