[vtk-developers] addition to vtkImagePlaneWidget - design ques.

Charl P. Botha c.p.botha at its.tudelft.nl
Mon Sep 23 13:29:33 EDT 2002


On Mon, Sep 23, 2002 at 12:49:51PM -0400, Dean Inglis wrote:
> I'm considering having vtkImagePlaneWidget inherit from 
> vtkPolyDataSourceWidget so that a method proposed by Charl
> can be implemented.  API calls to SetOrigin, SetPoint1 etc.
> currently do not update the internal vtkPlaneSource, so what
> is req'd is a call like ...
> 
> void SyncToPlaneSource(void)
> {
>    this->PlaneSource->Update();
>    this->UpdateNormal();
>    this->UpdateOrigin();
>    this->UpdateMargins();
> }
> 
> but I believe this should be implemented (and named) via the proposed
> superclasses virtual UpdatePlacement method.
> 
> Any thoughts?

Yes, especially since I'm the one that made vtkPolyDataSourceWidget and that
hasn't had time to update any of the other widgets except vtkPlaneWidget so
far :).  I used to think that deriving vtkImagePlaneWidget from
vtkPolyDataSourceWidget would be a bad idea due to the somewhat higher
complexity of the IPW. However, after having just read the documentation of
vtkPolyDataSourceWidget again, it seems perfect to have IPW inherit from
this.  It could easily be argued that vtkImagePlaneWidget IS_A
vtkPolyDataSourceWidget.

If you want, I can perform this "conversion" for you.  If not, the
documentation in vtkPolyDataSourceWidget should be read (which you've
probably done) and vtkPlaneWidget can be used as example.

Thanks,
Charl

-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/



More information about the vtk-developers mailing list