vtkExtractVolume class

Dr. Jasjit Suri jsuri at enya.picker.com
Wed Oct 6 07:22:20 EDT 1999


Hello..;

As per the man pages of VTK,
another fast way to extract a particular slice is using the
vtkExtractVOI.

I suppose this should work.

Why is FOUR STEP PIPE  LINE DOES NOT WORK ?.
The reader reads using vtkImageReader() and then converts
to structured points.  The good thing about vtkExtractVOI is that
it can take both inputs: Structured Points and images.
I tried using both methods.

This pipeline should be a gray scale image on the screen, Right ?

I get a gray plane rather then a gray scale image.

Why is that this pipeline does not yield the correct output ?
Lookuptable is ranged for 8 bits/pixel = 256 colors.

###### extracting a slice ##############

vtkExtractVOI aPlaneSection
   aPlaneSection SetVOI 127 127 0 215 1 215
   aPlaneSection SetInput [reader GetOutput]
   aPlaneSection Update

set bounds [[aPlaneSection GetOutput] GetBounds]

vtkPlaneSource aPlaneSource
aPlaneSource SetOrigin [lindex $bounds 0] [lindex $bounds 2] [lindex
$bounds 4]
aPlaneSource SetPoint1 [lindex $bounds 0] [lindex $bounds 2] [lindex
$bounds 5]
aPlaneSource SetPoint2 [lindex $bounds 0] [lindex $bounds 3] [lindex
$bounds 4]
aPlaneSource SetResolution 255 255

vtkLookupTable cLUT
   cLUT SetHueRange 0.0 1.0
   cLUT SetNumberOfColors 256
   cLUT SetTableRange 0 255
   cLUT SetSaturationRange 0 0
   cLUT SetValueRange 0 1
   cLUT SetAlphaRange 1 1
   cLUT Build

vtkPolyDataMapper sm
    sm SetInput [aPlaneSource GetOutput]
    sm SetLookupTable cLUT

vtkActor sa
  sa SetMapper sm

ren4 AddActor isoActor
ren4 AddActor sa
###################################################




-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------




More information about the vtkusers mailing list