-
Notifications
You must be signed in to change notification settings - Fork 7
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
Thchang/582 improve coordinate system selection when loading images #2351
base: dev
Are you sure you want to change the base?
Thchang/582 improve coordinate system selection when loading images #2351
Conversation
@TienHao I am wondering why the issue cannot be solved by resetting the OverlayGlobalSetting to default when loading a new file. |
Is it simpler if we also set to AUTO here?
Should we remain unchanged here?
Is it simpler if we also set to AUTO here? |
@loveluthien: Yes it can solved like that. I had made this PR too complicated before...(having included a previous comment which needed a check between coordinate system and the system of the loaded image.) |
I have made the switching results of the specified coordinate system just like @YuHsuan-Hwang mentioned above. It’s way simpler now. And the description of PR has been updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes are clear. 👍
Some comments:
@TienHao @YuHsuan-Hwang With v4.1/dev branch, I think the issue mentioned in #582 (very old from 2019 so this was referring to the version at that time) does not exist? The coordinate label in the toolbar of the image viewer shows the correct and consistent one. In addition, I think the behavior in dev/v4.1 branch is fine. In this PR, I see the coordinate system (when it is "WCS") changes with "active" image and affects other images, resulting a non-ideal UX. Ideally, let's try to see if we can achieve the following rules:
Would this logic be sensible? |
Looks like v4.1 inherit the system instead of resetting to AUTO. Do you prefer we set back to inheriting?
Currently we don't support independent system, which is another issue #1619. We could simply delete some code to retrieve the same behavior in dev, so I would suggest we implement this in another branch. |
@YuHsuan-Hwang @TienHao OK. Let's see if we can try the following logic:
Would this be sensible and intuitive to users? |
Looks good to me. |
Not sure what we do for exception handling? For example if the appended image has no wcs header defined and if a specific coordinate system (eg GAL) has been selected for the reference image, shall we reset the selection back to WCS and refer it to a sensible default? Or the case if the reference has no wcs header defined but the appended one has a valid coordinate system? Update: maybe if we can have an image coordinate (IMG for short) in the selection list, exception won't be an issue as every image should at least support the image coordinate for sure. |
I think we don't have error handling for this. We can file issues with reproduce steps. |
OK I filed #2366 for supporting image coordinate grid in the WCS list of the image viewer. No sure if we can handle this new enhancement first then revisit this PR? |
@kswang1029 @YuHsuan-Hwang : I have modified the PR and made the "WCS" refers to the last loaded/appended image. And if the last loaded/appended image is closed, the "WCS" reference will change to the last remained image. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's set #2366 as a separate issue and proceed with the review.
The new changes look good to me. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice fix! no regression from e2e tests 👍
@loveluthien @crocka please help reviewing/testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Behave like what we expect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good with bp5 update.
Description
This PR closes #582 and fixes a regression of updating
defaultSystem
(overlayStore) from AST.This PR makes a improvement for switching coordinate system after loading or appending images, especially when the user has already loaded a image and explicitly specified a coordinate system(not Auto).
In the loading scenario, the explicitly specified coordinate system:
changes to Auto.
In the appending scenario, the explicitly specified coordinate system:
remains unchanged, if the "WCS matching on append" option in the preference includes "Spatial",
or changes to Auto for the rest.
This PR also fixes a inconsistency between
defaultSystem
(overlayStore) and the defined system in the image header. This inconsistency happens after the user explicitly specified a coordinate system. Then if the user loads a new image or changes the active frame, thedefaultSystem
(overlayStore) will fixed to the specified system.Checklist
For linked issues (if there are):
For the pull request:
no changelog update neededunit test added (for functions with no dependenies)API documentation added (for public variables and methods in stores)For dependencies:
protobuf version bumped/ no protobuf version bumped neededprotobuf updated to the latest dev commit/ no protobuf update neededcorresponding ICD test fix added (/ no ICD test fix needed (BackendService
changed)BackendService
unchanged)user manual prepared (for large new features)