-
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
Added stack properties dialog in the Main Window #2465
base: main
Are you sure you want to change the base?
Conversation
bb53906
to
0402a71
Compare
0459daa
to
5174a20
Compare
…ck_data_set_correctly
624db20
to
6f31502
Compare
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.
I get an error if I try to view properties of a 180 projection. I think a case is missing in _get_stack_data_type()
super().__init__(view) | ||
|
||
def set_stack_data(self) -> None: | ||
if self.view.stack is not None: |
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.
Not sure if this is from a mypy suggestion or older version of the code.
If self.view.stack
is None
then something has gone wrong (e.g. side bar has got out of sync), so I don't think it should be silently ignored here.
It might be better handled with an assert self.stack is not None
in the view, so that the rest of the dialog can assume that it is set. Or this and the call to get_images_by_uuid()
could move into the main window.
self.view.stack_shape = self.view.stack.data.shape | ||
self.view.stack_size_MB = self.get_stack_size_MB() | ||
|
||
def set_stack_directory(self): |
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.
Needs a -> None
@@ -683,6 +687,10 @@ def _move_stack(self) -> None: | |||
stack_id = self.dataset_tree_widget.selectedItems()[0].id | |||
self.presenter.notify(PresNotification.SHOW_MOVE_STACK_DIALOG, stack_id=stack_id) | |||
|
|||
def _stack_properties(self): |
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.
Needs a -> None
@@ -109,6 +110,7 @@ class MainWindowView(BaseMainWindowView): | |||
nexus_save_dialog: NexusSaveDialog | None = None | |||
add_to_dataset_dialog: AddImagesToDatasetDialog | None = None | |||
move_stack_dialog: MoveStackDialog | None = None | |||
stack_properties_dialog: StackPropertiesDialog | None = None |
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.
This is no longer needed, I think its left over from when there was a self.stack_properties_dialog
from mantidimaging.core.data import ImageStack | ||
from mantidimaging.core.data.dataset import Dataset |
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.
These could be in a if TYPE_CHECKING:
Issue
Closes #2368
Description
Added a custom dialog window which can be accessed by right clicking a stack in the main window and clicking on "Stack properties". This gives information on the stack e.g, Dataset name, File Path, Data type, Memory size, Shape, Log file. More information can be added if needed.
Testing
Make check
Acceptance Criteria
Load a dataset into MI and open the Stack Properties dialog window via the right click window. Check that all the information displayed is correct and that no errors occur