Previous

Section

<<<

Isosurface Generation Using VTK

Next

Section

>>>

VTK Basics

 

 

3.5.1.2. Creating the Pipeline: vtkExtractVOI

 

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

 

Studying the highlighted section:

·        “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.”

o       This is the same thing said a few different ways.  The essence of this oversized description is that it is necessary to extract a volume of interest and sample it.  Since the actually body height is encapsulated in the slices, changing the z-extent (“range of slices”) will affect what portion of the body is shown.  Changing the x-extent and y-extent will hide some of the machine surface and other noise that may appear in the volume (“does not show the machine or table”).  The bottom line is that the VTK class named vtkExtractVOI needs to be used.

§         The first call to make is to SetVOI( int,int, int,int, int,int ).  From working with the Visible Woman dataset, the following values are probably suitable for getting rid of unwanted surfaces and isolating the head for viewing:  ( 0,255, 60,255, 0,100 )

§         The next call is the sampling rate.  No specific rate was specified, but one needs to think about what may be implied.  Seeing the individual slices stacked together (z-extent) is probably more important than a single slice (x-, y- extents).  Additionally, there could be a specification that says “view slices at resolutions of 256x256, 128x128, 64x64”.  Using these desired settings would result in the following function calls (remember, the parameters are integers, so there is no continuous gradient of subsampling):

·        256x256: SetSampleRate( 1, 1, 1 )

·        128x128: SetSampleRate( 2, 2, 1 )

·        64x64: SetSampleRate( 3, 3, 1 )

 

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

  • vtkExtractVOIObject.SetInput( vtkImageReaderObject.GetOutput() )

 

 

<<< Previous

Creating the Pipeline: vtkImageReader

Table of Contents

 

Next >>>

Creating the Pipeline: vtkMarchingCubes / vtkContourFitler