In reply to your previous e-mail about vtkFollowers I sent you the utils file which computes the size of a pixel in mm back-projected to a certain position in 3D space. It uses vtk machinery to do the projection and I think it might give you some hints about how to achieve what you want. I didn't manage to do that using mitk-only functionality.

Rostislav.

On 03/09/2015 23:17, Federico Milano wrote:

Hi. I'm trying to obtain the 2D (projected) coordinates of a 3D point in the 3d window of the stdmultiwidget. Since Im using 2014.03 Im doing the following:
displayGeometry->Project(p, projected_p);
displayGeometry->Map(projected_p, pt2d);
displayGeometry->WorldToDisplay(pt2d, pt2d);

The problem is that if I rotate or translate or zoom the camera (my 3d point is not in the focal point) I always get the same 2D coordinates. What would be the procedure to obtain the projected 2D position of a 3D world coordinate. Should I fall back to VTK?

Thanks in advance!

Federico



------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140


_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to