Skip to content
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

Merged
merged 2 commits into from
Jun 22, 2017

Conversation

lassoan
Copy link
Member

@lassoan lassoan commented Jun 21, 2017

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:
image

After the fix:
image

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).
lassoan added a commit to lassoan/SlicerGitSVNArchive that referenced this pull request Jun 21, 2017
Requires integration of "BUG: Fixed warped widgets in ctkVTKSliceView overlay" in CTK (commontk/CTK#720).
@pieper
Copy link
Member

pieper commented Jun 21, 2017

👍

@lassoan
Copy link
Member Author

lassoan commented Jun 21, 2017

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.

@lassoan
Copy link
Member Author

lassoan commented Jun 21, 2017

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.

@finetjul finetjul merged commit 9e6df18 into commontk:master Jun 22, 2017
@finetjul
Copy link
Member

That seems reasonable to me. Thanks Andras.

jcfr pushed a commit to Slicer/SlicerGitSVNArchive that referenced this pull request Jun 22, 2017
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
fedorov pushed a commit to fedorov/Slicer-legacy that referenced this pull request Jun 24, 2017
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants