vtkImplicitVolume/colorlookup/grayscale image
Dr. Jasjit Suri
jsuri at enya.picker.com
Tue Oct 5 13:21:46 EDT 1999
Hello..
I guess those who deal with volumes can tell me something on this...
1) I take the VOI and extract the plane i wish using vtkPlaneSource
in part 1 of the code attached...
2) Now i define the implicit Function using vtkImplicitVolume
and pass that to the vtkClipPolyData.
This will snap the gray scale image on the cut section.
I wish to know why i cannot get the original gray scale
image even though i adjust the colorlookuptable
for the 8 bit data...
Is it that the color look up table does not work when
the clip function is the implicit volume ?
I tried every way to adjust the parameters
but i cannot get the gray scale image ?
But i use the pipeline:
vtkPlaneSource->vtkTransformPolyDataFilter-->
vtkProbeFilter-->vtkCastToConcrete-->vtkTriangleFilter-->
vtkSTripper-->vtkLookupTable-->vtkPolyDataMapper-->
vtkActor-->AddActor, T H E N,
I am able to get the gray sale image. fine...
Here is the code which uses vtkImplicitVolume :
--------------------------------
# part1 : get the plane source from the VOI
vtkExtractVOI aPlaneSection
aPlaneSection SetVOI $centerX $centerX 0 $endZ 0 $endY
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 200 100
# --------------------------------------------------------
# part 2
vtkImplicitVolume aVolumeModel
aVolumeModel SetVolume [SP GetOutput]
# clip the polydata
set iso_levelB 40.0
vtkClipPolyData clipperB
clipperB SetInput [aPlaneSource GetOutput]
clipperB SetClipFunction aVolumeModel
clipperB SetValue $iso_levelB
clipperB GenerateClipScalarsOn
clipperB Update
set win_value 255
set win_level 127
set table_range 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
set scalar_range 40.0
vtkPolyDataMapper aClipperMapperB
aClipperMapperB SetInput [clipperB GetOutput]
aClipperMapperB SetScalarRange 0 $scalar_range
aClipperMapperB ScalarVisibilityOff
aClipperMapperB SetLookupTable cLUT
vtkActor cut
cut SetMapper aClipperMapperB
ren AddActor cut
------------------------------------------
-----------------------------------------------------------------------------
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