-
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
2027 adjustable ROI #2031
2027 adjustable ROI #2031
Conversation
…t/mantidimaging into 2027_adjustable_ROI
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.
If you're happy to implement it, when an ROI is clicked in the image view, I think we should select that ROI within the ROI table as this seems like it should already be the case intuitively.
…t/mantidimaging into 2027_adjustable_ROI
…t/mantidimaging into 2027_adjustable_ROI
Looks like Applitools tests need to be updated: https://eyes.applitools.com/app/test-results/00000251694396968241/00000251694396790667?accountId=-yE-mpxluECTdfURli4jgA~~ |
Can you please add some release notes |
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.
Thanks for condensing. just a few little bits left now
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! just a few more tiny things and then this is good to merge
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.
Thanks for adding all the changes in! Looks really good!
Just two small things now and we're there! 👍
If I delete all ROIs from the ROI view, then navigate to the Image view, the spin boxes need to be re-enabled for that view then disabled again on returning to Image view if no ROI's exist (See screenshot)
If i remove all ROI's from ROI view, navigate to Image view, swap samples, then return to ROI view, the state changes are not synced up causing the KeyError (see screenshot and logs)
Logs:
2024-02-16 13:59:44,642 [mantidimaging.core.utility.progress_reporting.progress:L241] INFO: Elapsed time: 11 sec.
2024-02-16 14:00:00,263 [perf.mantidimaging.gui.mvp_base.view:L59] INFO: SpectrumViewerWindowView shown in 0.8960616621188819
2024-02-16 14:00:10,615 [py.warnings:L109] WARNING: /home/vco13151/mambaforge/envs/mantidimaging-dev/lib/python3.10/site-packages/pyqtgraph/graphicsItems/PlotItem/PlotItem.py:509: UserWarning: Item already added to PlotItem, ignoring.
2024-02-16 14:00:13,657 [mantidimaging.gui.windows.main.view:L513] ERROR: Traceback (most recent call last):
File "/home/vco13151/mantidimaging/mantidimaging/gui/windows/spectrum_viewer/presenter.py", line 288, in handle_export_tab_change
self.view.on_visibility_change()
File "/home/vco13151/mantidimaging/mantidimaging/gui/windows/spectrum_viewer/view.py", line 221, in on_visibility_change
self.set_roi_properties()
File "/home/vco13151/mantidimaging/mantidimaging/gui/windows/spectrum_viewer/view.py", line 450, in set_roi_properties
current_roi = self.presenter.model.get_roi(self.current_roi)
File "/home/vco13151/mantidimaging/mantidimaging/gui/windows/spectrum_viewer/model.py", line 122, in get_roi
raise KeyError(f"ROI {roi_name} does not exist in roi_ranges {self._roi_ranges.keys()}")
KeyError: "ROI None does not exist in roi_ranges dict_keys(['all', 'roi', 'rits_roi'])"
2024-02-16 14:00:13,657 [mantidimaging.gui.mvp_base.view:L40] ERROR: show_error_dialog(): Uncaught exception KeyError: "ROI None does not exist in roi_ranges dict_keys(['all', 'roi', 'rits_roi'])"
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.
Just this to fix now and good to merge
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! Thanks for making the changes
Issue
Closes #2027.
Description
A table has been added under the ROI tabs in the Spectrum Viewer which displays the properties of the currently selected ROI (selected by clicking on the ROI Table). Currently the properties displayed are: Left, Top, Right, Bottom, Width, Height, Area.
The currently selected ROI can be adjusted by using spin boxes in the table allowing for more precise positioning.
This table also functions for the RITS ROI when that tab is activated.
More properties and details about the ROIs can be added as needed/required.
Unit Tests will be written in a future commit.
Testing
make check
Acceptance Criteria
Check that the numbers in the table are correct and update accordingly (i.e. when the ROI is changed).
Check that changing the numbers in the Table update the ROI properly.
The rest of the Spectrum viewer should function the same as before.