[vtk-developers] proposed ENH to vtkImagePlaneWidget
Dean Inglis
dean.inglis at on.aibn.com
Fri Aug 2 10:13:38 EDT 2002
Hmmmm, strangely enough, transparency already works without any changes:
try this if you dare ... (in /Examples/GUI/Tcl/ImagePlaneWidget.tcl)
<snip>
# The shared picker enables us to use 3 planes at one time
# and gets the picking order right
#
vtkCellPicker picker
picker SetTolerance 0.005
vtkLookupTable table
table SetNumberOfColors 256
table SetHueRange 0 0
table SetSaturationRange 0 0
table SetValueRange 0 1
table SetAlphaRange 1 1
table Build
# The 3 image plane widgets are used to probe the dataset.
#
vtkImagePlaneWidget planeWidgetX
planeWidgetX DisplayTextOn
planeWidgetX TextureInterpolateOff
planeWidgetX SetResliceInterpolateToNearestNeighbour
planeWidgetX SetInput [v16 GetOutput]
planeWidgetX SetInteractor iren
planeWidgetX SetPlaneOrientationToXAxes
planeWidgetX SetSliceIndex 32
planeWidgetX SetPicker picker
planeWidgetX SetLookupTable table
planeWidgetX SetKeyPressActivationValue "x"
set prop1 [planeWidgetX GetPlaneProperty]
$prop1 SetColor 1 0 0
planeWidgetX On
vtkImagePlaneWidget planeWidgetY
planeWidgetY DisplayTextOn
planeWidgetY TextureInterpolateOff
planeWidgetY SetResliceInterpolateToNearestNeighbour
planeWidgetY SetResliceInterpolateToCubic
planeWidgetY SetInput [v16 GetOutput]
planeWidgetY SetInteractor iren
planeWidgetY SetPlaneOrientationToYAxes
planeWidgetY SetSliceIndex 32
planeWidgetY SetPicker picker
planeWidgetY SetKeyPressActivationValue "y"
set prop2 [planeWidgetY GetPlaneProperty]
$prop2 SetColor 1 1 0
planeWidgetY SetLookupTable table
planeWidgetY On
vtkImagePlaneWidget planeWidgetZ
planeWidgetZ DisplayTextOn
planeWidgetZ TextureInterpolateOff
planeWidgetZ SetResliceInterpolateToNearestNeighbour
planeWidgetZ SetInput [v16 GetOutput]
planeWidgetZ SetInteractor iren
planeWidgetZ SetPlaneOrientationToZAxes
planeWidgetZ SetSliceIndex 46
planeWidgetZ SetPicker picker
planeWidgetZ SetKeyPressActivationValue "z"
set prop3 [planeWidgetZ GetPlaneProperty]
$prop3 SetColor 0 0 1
planeWidgetZ SetLookupTable table
planeWidgetZ On
table SetValue 0 0 0 0
<snip>
Dean
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dean Inglis, Ph.D.
Clinical Research Unit
25 Charlton Avenue East, Unit 610
Hamilton, ONT, L8N 1Y2
tel: (905) 527-0028
fax: (905) 521-1297
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the vtk-developers
mailing list