mantidproject / mantidimaging

Graphical toolkit for neutron imaging.
https://mantidproject.github.io/mantidimaging
GNU General Public License v3.0
13 stars 6 forks source link

Add / Replace Image Stack doesn't allow .fits files #2152

Open MikeSullivan7 opened 7 months ago

MikeSullivan7 commented 7 months ago

Summary

Loading any extra files through the "Add / Replace Image Stack" dialog does not allow the selection of .fits files

Steps To Reproduce

Open MI and load data, then right click the data stack on the tree on the left and click "Add / Replace Stack". Clicking the "Choose File" button only allows .tif and .tiff files to be selected.

Expected Behaviour

The "Add / Replace Stack" should be able to load the same file types as the main Load Dataset file dialog.

Current Behaviour

Only .tif and .tiff files can be loaded though the "Add / Replace Stack" file dialog

MikeSullivan7 commented 2 months ago

It seems that the "Add / Replace Image Stack" dialog doesn't work at all anymore, even with .tif or .tiff files.

2024-08-15 15:02:35,090 [mantidimaging.gui.windows.main.view:L589] ERROR: Traceback (most recent call last):
  File "C:\Users\ddb29996\mantidimaging\mantidimaging\gui\windows\add_images_to_dataset_dialog\view.py", line 37, in _on_accepted
    self.presenter.notify(Notification.IMAGE_FILE_SELECTED)
  File "C:\Users\ddb29996\mantidimaging\mantidimaging\gui\windows\add_images_to_dataset_dialog\presenter.py", line 29, in notify
    self.load_images()
  File "C:\Users\ddb29996\mantidimaging\mantidimaging\gui\windows\add_images_to_dataset_dialog\presenter.py", line 37, in load_images
    start_async_task_view(self.view, self.view.parent_view.presenter.model.load_image_stack,
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MainWindowModel' object has no attribute 'load_image_stack'
MikeSullivan7 commented 2 months ago

It seems like this has been broken as far back as release-2.7.0 which is confusing as I thought this would be caught in manual testing...

MikeSullivan7 commented 2 months ago

The error is still showing in release-2.6.0 after rebuilding the dev environment (after swapping out the old intel channel)

samtygier-stfc commented 2 months ago

https://github.com/mantidproject/mantidimaging/pull/2317 is the fix for Add/Replace on an open dataset, which has been broken for a while.

The File->Load Images method (which makes a new dataset with the new stack) works for tif but not for fits. That's probably the method that this issue should be about. Though it would be good to fix both methods.