Hello Mikhail,
you could just compute the distance between the current cameraposition
and the 3D worldposition which you seem to have already acquired.
you can use the following calls on the mitk::BaseRenderer:
renderer->Map2DRendererPositionTo3DWorldPosition(mitk::Point2D);
//returns the 3D position to the given 2D display coordinate
renderer->GetVtkRenderer()->GetActiveCamera()->GetPosition();
//returns the 3D coordinate of the current camera position
However, if you are looking for a depth map of the renderwindow, this
example might be interesting for you:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/ZBuffer
For multiple points, this would be much faster than the method above.
Regards
Christoph
On 05/18/2015 12:00 PM, Pukhlikov Mikhail wrote:
For now if I want to set point on 3D window
VtkPropRenderer::PickWorldPoint calls
And there is: m_WorldPointPicker->Pick(displayPoint[0],
displayPoint[1], 0, m_VtkRenderer);
Which takes 0 position for depth (seems like)
I need some way / method / algorithm to take depth to nearest model on
3D view.
I will be glad to hear any suggestions around implementation.
Thank you!
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users