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: Fix computation of offset direction label in slicer view controller #6781

Merged
merged 1 commit into from Jan 15, 2023

Conversation

lassoan
Copy link
Contributor

@lassoan lassoan commented Jan 14, 2023

Sagittal plane offset direction label "R" was incorrect: moving the slider to the right did not move the slice in "R" direction (while for axial and coronal slices, moving the slider to the right moved the slice according to the direction specified in the label).

Instead of changing the incorrect "R" label to "L", this commit removes the hardcoded labels and instead computes the correct label dynamically. If the slice normal direction is not aligned with an axis then the label contains a combination of directions. The order of axes reflects the dominance of the axis. For example, if the plane normal points to anterior and slightly left then the label is AL.

fixes #6778

Sagittal plane offset direction label "R" was incorrect: moving the slider to the right did not move the slice in "R" direction (while for axial and coronal slices, moving the slider to the right moved the slice according to the direction specified in the label).

Instead of changing the incorrect "R" label to "L", this commit removes the hardcoded labels and instead computes the correct label dynamically.
If the slice normal direction is not aligned with an axis then the label contains a combination of directions. The order of axes reflects the dominance of the axis.
For example, if the plane normal points to anterior and slightly left then the label is AL.

fixes Slicer#6778
@lassoan lassoan added this to the Slicer 5.3 milestone Jan 14, 2023
@lassoan lassoan requested a review from pieper January 14, 2023 04:37
@lassoan lassoan self-assigned this Jan 14, 2023
Copy link
Member

@pieper pieper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 👍

@lassoan
Copy link
Contributor Author

lassoan commented Jan 15, 2023

Thanks for the review. I'll merge this now.

@lassoan lassoan merged commit 5e3a9c3 into Slicer:main Jan 15, 2023
@lassoan lassoan deleted the fix-slice-offset-label branch January 15, 2023 20:43
@jcfr jcfr added the backport:5.x Identify pull request expected to be backported to the current 5.x release branch. label Jan 23, 2023
@jcfr jcfr removed the backport:5.x Identify pull request expected to be backported to the current 5.x release branch. label Jan 24, 2023
@jcfr jcfr modified the milestones: Slicer 5.3, Slicer 5.2.2 Mar 13, 2023
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.

Sagittal slice view sign inverted
3 participants