[vtkusers] Image plane widget + color transfer function?
dean.inglis at camris.ca
dean.inglis at camris.ca
Wed Jan 30 13:10:04 EST 2008
Hi Paul,
you can add a vtkColorTransferFunction to vtkImagePlaneWidget:
e.g.
vtkColorTransferFunction colors
colors SetRange $dataMin $dataMax
colors AddRGBPoint $dataMin 0 0 1
colors AddRGBPoint $dataMax 1 0 0
colors SetColorSpaceToRGB
colors Build
vtkImagePlaneWidget planeWidgetX
[planeWidgetX GetColorMap] SetLookupTable colors
the only thing that won't work will be window/levelling
Dean
Hello, Is there any way to accomplish the following: 1. Given a structured points set of integers (cell counts generated by a simulation, in this case) 2. Define a color transfer function based on threshold values (i.e. 0..999 cells - red, 1000-99999 green, etc). 3. Use a vtkImagePlaneWidget to slice through the volume using the above c.t.f. I can't seem to get it done without a lot of hoops to jump through. The problem lies in the fact that the vtkImagePlaneWidget can not use a c.t.f., only a vtkLookupTable. For this dataset the scalar values have a range of roughly [0,1500000] requiring a large lookup-table if done with vtkLookupTable, which feels like I'm abusing the class. Thanks in advance for any help, Paul
More information about the vtkusers
mailing list