(graphics): fix picker imprecision
Summary
When using the picker on a medical image, the picked position does not correspond to a voxel position of the image. It exists an imprecision and this can be a problem for some applications.
Steps to reproduce
Launch an application that uses a picker on an image and prints the returned picked position.
Check that the position does not correspond to a position of a voxel of the image.
Possible fixes
What already be tested:
- in
CollisionTools.cpp
in function RayCast, line 438 and 452, prints vertices: the printed values are not good. The imprecision is present in the triangles coordinates - in
Plane.cpp
: in initializePosition method, try to divide by float --> No impact - in
Plane.cpp
: in setDimensions method, check the values of depth, width and height: OK - check conversion to Ogre of Spacing and Origin: OK