-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add 'fslview' displaySpace, and change orientation warnings behavior #117
Add 'fslview' displaySpace, and change orientation warnings behavior #117
Conversation
* fslview-compatible displaySpace uses pixdim-flip, similar to fslview/fsl coordinate space behavior * Orientation labels are now displayed when in pixdim (scaledVoxels) or pixdim-flip (fslview) spaces, but a warning is displayed that they may be incorrect. * This warning may be suppressed with a new --hideOrientationWarnings
Hi @CGSchwarzMayo, sorry for the delay - I'll get to this in the next day or so .. |
No problem! It's not such a hurry. Thank you!! |
Hi @CGSchwarzMayo, I think this looks fine - I'll have a bit of a play to try and wrap my head around the implications, and see if I can make it more robust to being reset when e.g. a second view is opened. I was also thinking it might be nice to invert the warning logic in the code - i.e. instead of One other question - the short form cli flag is currently I'm happy to go ahead and make these changes if they sound good to you (I've already made them on my local copy 😉). |
I think the label resetting issue is actually not a problem - it was only relevant to the if opts.transform in ('id', 'pixdim', 'pixdim-flip') and \
self.displayCtx.displaySpace != refImage:
# display Xmin/Xmax/etc
else:
# display L/R/etc But this issue can be completely resolved by tweaking the logic so that if self.displayCx.displaySpace == 'scaledVoxel':
# display Xmin/Xmax/etc
else:
# display L/R/etc The former logic is britttle because the And, given this, I'm not even sure that an additional warning message in the location panel is necessary - I've come to think that it suffices to retain the current logic, and simply display a warning whenever there is a FOV/orientation mismatch between any pair of overlays (which would already cover the situation I was concerned about with the new So the behaviour for different
And in all cases, show a warning message about mismatched FOV/orientation, unless all images match (or @CGSchwarzMayo How does all of that sound to you? |
Paul, I'm happy to make the changes, but if you've already made them in your local copy, I'm even happier to let you proceed and not replicate the work. Again, thanks for your willingness to consider this feature! |
I think it's a good approach, but maybe a little editing for concision would make it more friendly to smaller screens/resolutions. How about something like: I thought about "FOVs", but maybe not all users know the acronym, so perhaps "sizes" is a good laypersons' term? A still-shorter version would be: |
I like your first suggestion; the previous version of the message already uses "fields of view", so I think it would work to keep that term in, e.g.: Images have different orientations/fields of view - alignment/orientation labels may be incorrect! |
That works for me, thanks! I'm seeing that this branch has conflicts that must be resolved. That's because you're already in the process of merging it with your changes, and I shouldn't do anything, right? |
@CGSchwarzMayo Yep, it's been merged (I manage the code at https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/). I had been under the impression that GitHub was smart enough to detect when commits from a PR have been merged, and to automatically close the PR, but this doesn't seem to be the case. Regardless, this change will be in the next FSLeyes release - thanks again! |
Wonderful. Thank you! |
Add 'fslview' displaySpace, and change orientation warnings behavior
* fslview-compatible displaySpace uses pixdim-flip, similar to fslview/fsl coordinate space behavior
* Orientation labels are now displayed when in pixdim (scaledVoxels) or pixdim-flip (fslview) spaces, but a warning is displayed that they may be incorrect.
* This warning may be suppressed with a new --hideOrientationWarnings
This is similar to #84, but for our case we needed pixdim-flip rather than pixdim (scaledVoxels). We are doing a direct migration of workflows from fslview, and some of the images are in old, frozen databases where nii orientations are not consistent and it was never noticed in fslview, but fixing all the affected images at this point would be a burden, so we are seeking an option to use the old fslview-like behavior in this circumstance. We also weren't quite satisfied with the behavior of changing the orientation labels during scaledVoxels, as we know these labels are correct for our images.
From discussing with Paul over email, he suggested that we could display the anatomical orientation labels with a warning that they may be incorrect, and also add a --hideOrientationWarnings that could suppress this warning. I wasn't entirely clear whether this was intended to also suppress the original "displaying images with different orientations" warning. At this point, I only suppressed the new warning, which reverts to the old warning in most of the cases where it would have appeared.
Thanks for your consideration! I am happy to iterate on this. I also wasn't sure whether to keep it as "fslview" space, or change to "fsl" space, as you suggested that fslview's behavior is really the same across all fsl. I can change it if you prefer.
Chris Schwarz
Mayo Clinic