-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Fixed warped widgets in ctkVTKSliceView overlay #720
Conversation
Default camera for overlay layer in ctkVTKSliceView was a default VTK camera with perspective projection. This caused widgets appear tilted/warped when displayed near the edge of the render window. This was particularly visible in vector text rendered by VTK seed widget (markup fiducials in 3D Slicer).
Requires integration of "BUG: Fixed warped widgets in ctkVTKSliceView overlay" in CTK (commontk/CTK#720).
👍 |
I've done some more testing with this patch in Slicer and found issues with placing ruler and ROI annotations. Somehow the mapping between display and world coordinate system is impacted. There were some workarounds in the code, so maybe there were some underlying issues earlier that this change uncovered. I continue to investigate this. |
Setting all slice view renderer cameras to use parallel projection solved the issue. Probably the issue is that widget point placer may find a different renderer than the widget's renderer. The behavior is now correct and I cannot spend more time on investigating how this could be made more robust/future-proof. |
That seems reasonable to me. Thanks Andras. |
Warping of markup fiducial labels was caused by using perspective projection in overlay renderer's camera. See details in commontk/CTK#720. By switching to parallel projection, default scaling of widgets have to be adjusted, and all other renderers should also use parallel projection to make point placing for widgets invariant to the renderer that is picked. git-svn-id: http://svn.slicer.org/Slicer4/trunk@26107 3bd1e089-480b-0410-8dfb-8563597acbee
Warping of markup fiducial labels was caused by using perspective projection in overlay renderer's camera. See details in commontk/CTK#720. By switching to parallel projection, default scaling of widgets have to be adjusted, and all other renderers should also use parallel projection to make point placing for widgets invariant to the renderer that is picked. git-svn-id: http://svn.slicer.org/Slicer4/trunk@26107 3bd1e089-480b-0410-8dfb-8563597acbee
Default camera for overlay layer in ctkVTKSliceView was a default VTK camera with perspective projection.
This caused widgets appear tilted/warped when displayed near the edge of the render window.
This was particularly visible in vector text rendered by VTK seed widget (markup fiducials in 3D Slicer).
Before the fix:
After the fix: