-
Notifications
You must be signed in to change notification settings - Fork 3
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
Restore image settings during refresh #613
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Refreshing the image has reset the image to default settings, but the user often wishes to keep adjusted settings, such as when viewing the same image. Now these settings are restored except when viewing a new image. This change also fixes synchronization between the image adjustment controls and the refreshed image since the auto button would remain unchecked after refreshing the image despite previously reverting to default setings. Now the auto button remains appropriately unchecked since the custom setting is restored.
On testing in Linux, relaunching an editor triggers an image adjustment channel control event, populating the adjustment controls with the new image's settings and preventing restoration of the prior image's settings. - Fix by flagging to ignore this channel control event - Update comment about ignoring change to empty image adjustment channels value
Redrawing the editor has not updated the adjustment controls, leaving them in a stale state until the adjustment channel control is changed. This stale state has been used now to restore adjustment settings to the new image, but the settings need to be updated when the settings are not restored, fixed here.
To speed up responsiveness, automically refresh the image when the user changes the image channel control. This change requires using an ignore flag to ignore channel changes during the control's initialization. The refresh also serves as a way to fully refresh the image without reloading the image now that the Redraw button leaves some settings intact.
Normalize the filtered ROI's range to the original image since filtering typically shifts the range considerably, causing the ROI Editor's overview and zoomed images to have very different ranges. This change also makes the ROI's intensity easier to adjust since otherwise it is typically a very low range below the scale bar's normal resolution.
Calculate the near min/max since the image has been fully loaded anyway rather than only memory mapped.
The range adjustments in the `RangeEditor` `xslider` do not adapt below a high of 10, making slider adjustments difficult for low ranges, such as 0-1. For these values, use the image's near max, especially now that images loaded as registered images calculate this value. If this range is too small, the user can enter higher values manually into the control's text field. To allow the user to use the scroller afterward, expand the intensity high range to this manually input value. Although the range cannot be decreased, the control can be reset by refreshing the image (now by changing a channel).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refreshing the image has reset the image to default settings, but the user often wishes to keep adjusted settings, such as when viewing the same image. Now these settings are restored except when viewing a new image.
This change also fixes synchronization between the image adjustment controls and the refreshed image since the auto button would remain unchecked after refreshing the image despite previously reverting to default setings. Now the auto button remains appropriately unchecked since the custom setting is restored.