Differentiate between volume-space and canvas-space crosshair positions
masterWhen working with MPR, you must distinguish between two types of crosshair position methods to avoid rendering or interaction errors:
getCrossHairPosition() (No arguments)
- Purpose: Returns the raw volume-space center.
- Usage: Used by the rendering pipeline (e.g.,
VolImageIO.getImageFragment(),MprAxis.updateRotation()) to sample the 3D volume. - Constraint: It must not apply any canvas projection. It represents a true 3D coordinate in the volume.
getCrossHairPosition(MprAxis axis)
- Purpose: Returns the center projected onto a specific view's 2D canvas.
- Usage: Used for UI and interaction (e.g.,
mouseMoved()for hit-testing,addCrossline()for drawing graphics,mouseDragged()for computing new positions). - Constraint: It must apply the full inverse rotation (
viewRotation⁻¹) to correctly project the 3D center onto the 2D plane.