[vtkusers] vtkSeedWidget: How to retrieve handle positions?1

Karthik Krishnan karthik.krishnan at kitware.com
Thu Apr 30 18:08:10 EDT 2009


On Thu, Apr 30, 2009 at 5:02 PM, kent williams <nkwmailinglists at gmail.com>wrote:

> I think I see how to to do it, but shouldn't there be some sort of
> method that does this without all the indirection required?
>
> It looks like you have to do it this way:
>
> typedef double SeedPoint[3];
> typedef std::list<SeedPoint> SeedPointList;
>
> SeedPointList pointList;
>
> vtkHandleWidget *handle;
> for(unsigned i = 0; (handle = seedWidget->GetSeed(i)) != 0; i++)
>  {
>  SeedPoint curPoint;
>  handle->GetWorldPosition(curPoint);
>  pointList.push_back(curPoint);
>  }
>
> Is this correct?


That is right :). Its retrieved from the seedwidget's children, the handles.



>
>
> Second important question -- does the 'world position' returned mean
> the 'real' world position or does it -- like vtkContourWidget -- have
> world X,Y,Z permuted depending on the orientation of the view?


It returns the real world position.

Thanks
--
karthik


> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Karthik Krishnan
R&D Engineer,
Kitware Inc.
Ph: 518 881 4919
Fax: 518 371 4573
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090430/cb92005e/attachment.htm>


More information about the vtkusers mailing list