[Insight-users] Point Extraction
Cameron Burnett
w_e_b_m_a_s_t_e_r_6_9 at hotmail.com
Wed Apr 23 08:57:01 EDT 2008
You can use a vtkPointWidget to select a point on a 3D object.
vtkPointWidget *pointWidget = vtkPointWidget::New();
pointWidget->SetInteractor(renderer->GetRenderWindow()->GetInteractor());
pointWidget->SetPlaceFactor(1.25); //this sets the widget to appear a small distance away from the object edges
pointWidget->SetProp3D(volume); // this tells the widget to attach itself to (in this case) a vtkVolume called volume
pointWidget->PlaceWidget();
pointWidget->On();
You can then get the current xyz coordinates with pointWidget->GetPosition()[0] where 0 is the x coordinate and 1 & 2 are y & z
Note that the point widget gives you physical coordinates. If you want a pixel index then you need to use the TransformPhysicalPointToIndex function.
I'm not sure if you can use this on 2D images as well, but I would imagine so.
Hope this helps a bit.
Regards,
Cameron.
> Date: Wed, 23 Apr 2008 14:14:41 +0200
> From: njiwa at biomed.ee.ethz.ch
> To: insight-users at itk.org
> Subject: [Insight-users] Point Extraction
>
> Hi everybody,
>
> I have two images and would like to perfom IterativeClosestPoint on these images. I have a problem because i don't have the coordinate of the points. Is there a way of getting tese points with ITK?
> Do somebody help me to solve this problem? I have 2D and 3D images. Thanks a lot.
>
> Regards,
>
> Josiane.
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
_________________________________________________________________
You dream job is up for grabs. Grab it.
http://mycareer.com.au/?s_cid=596065
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080423/3671c574/attachment.htm>
More information about the Insight-users
mailing list