Hi,
It is probably predictable that markups may work incorrectly with 3D view where zoom along different axes is different (in the animation Z-axis zoomed 8 times).
Does somebody know where to find methods that are responsible for this?
Hi,
It is probably predictable that markups may work incorrectly with 3D view where zoom along different axes is different (in the animation Z-axis zoomed 8 times).
Does somebody know where to find methods that are responsible for this?
I created a draft pull request but I need help to finilize it.
The idea:
As markups orientation is updated everytime camera is modified, the same way compensate scaling. Introduce vtkSmartPointer<vtkDoubleArray> GlyphScaleArray;
and set this->GlyphMapper->SetScaleModeToScaleByVectorComponents();
.
As orientation is updated in UpdateControlPointGlyphOrientation
, I introduce UpdateControlPointGlyphScale
function (in vtkSlicerMarkupsWidgetRepresentation3D.cxx
).
The problem:
Camera scaling is in global coordinate system.
Markups points always oriented away from the camera: X-to the left, Y-up, Z-away from camera.
To compensate camera scaling I need to correctly project scaling from global coordinate system to markups point coord system (I don’t have enough knowledge what is quaternion
and it seems I do that incorrectly).
To avoid parallel discussions, let’s talk about this in the pull request.