[vtkusers] vtkImagePlaneWidget + SetTextureVisibility()

dean.inglis at camris.ca dean.inglis at camris.ca
Thu Apr 12 16:08:03 EDT 2007


Mark,

there are numerous ways to get at the resliced output:
  // Description:  
  // Convenience method to get the vtkImageReslice output.
  vtkImageData* GetResliceOutput();

which in vtkIPW is passed to vtkImageMapToColors
whose output is passed to vtkTexture.  vtkIPW 
can give you the vtkImageMapToColors and/or the vtkTexture too.
If you write a callback and add it to the widgets
InteractionEvent wherein the texture can be requested to
Update(), then you can avoid switching texture on and
off: 
e.g., widget->AddObserver(vtkCommand::InteractionEvent, myCallback).  
If you are using a GUI element to move the widget,
you can still force the update by:
widget->InvokeEvent(vtkCommand::InteractionEvent).

Normally, when the actor that combines the vtkPlaneSource
and the vtkTexture is visible, the rendering pipeline mechanism
takes care of updating the texture (and preceding filters) for you.  
When texture visibility is off, there is no visible actor 
(maybe just the outline) and so the widget's internal 
pipeline is not being updated.

Dean



More information about the vtkusers mailing list