[vtkusers] Image plane widget + color transfer function?

Paul Melis paul at science.uva.nl
Thu Jan 31 08:39:20 EST 2008


*Hi Dean,

Thanks! That does the trick.

This feature does immediately raise the following question: is it 
possible to have an image-plane widget with transparent areas (i.e. 
colors with alpha < 1)  using a vtkColorTransferFunction? The latter 
only handles colors, not opacities, and the only other option to pass to 
ipw.GetColorMap().SetLookupTable() would be a vtkLookupTable which takes 
me back to my original problem in not wanting to use that class, hmmm

Paul

dean.inglis at camris.ca* dean.inglis at camris.ca 
<mailto:vtkusers%40vtk.org?Subject=%5Bvtkusers%5D%20Image%20plane%20widget%20%2B%20color%20transfer%20function%3F&In-Reply-To=>wrote:
<mailto:vtkusers%40vtk.org?Subject=%5Bvtkusers%5D%20Image%20plane%20widget%20%2B%20color%20transfer%20function%3F&In-Reply-To=> 


>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