[vtk-developers] Some proposed changes to vtkImagePlaneWidget

Dean Inglis dean.inglis at on.aibn.com
Wed May 22 14:48:42 EDT 2002


Hi all,

I am proposing the following changes to vtkImagePlaneWidget.  If there
are no objections/comments by tommorrow, I will commit them 2 p.m. EST.

1) add a convenience method to get the reslice output:
  vtkImageData* GetResliceOutput();

2) in the constructor add:
  this->PlaneMapper->SetResolveCoincidentTopologyToPolygonOffset();
  so that the PlaneOutline looks better from all views

3) move this->GenerateTexturePlane(); to the constructor so that the
  allocated LookupTable, Reslice ... TexturePlaneActor etc. are linked up
  and initialized to form a skeletal pipeline (no input data)

4) Change SetInput() to reflect 3) and finalize the necessary links with
 the input data.  This way the user can change the input as many times and
 whenever they want.

5) remove unecessary includes:  #include "vtkFloatArray.h", #include
"vtkDoubleArray.h"

6) remove the macro ABS() and replace with fabs() in UpdateOrigin()

7) make some fixes to SetSliceIndex and GetSliceIndex: remove the 0.5 in the
calculations,
 and make SetSliceIndex/SetSlicePosition user proof

8) in the events On<something>ButtonDown, change
( node->GetProp() == (vtkProp*)(this->TexturePlaneActor) )
to use vtkProp::SafeDownCast


regards,
Dean





More information about the vtk-developers mailing list