mantidproject / mantidimaging

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

Fix add or replace stack in dataset #2317

Closed samtygier-stfc closed 1 month ago

samtygier-stfc commented 1 month ago

Issue

Closes #2315

Description

An old refactoring (e4441731593dbeb0b9ce8d773141c905854bc820) had inlined the load_image_stack method without realising that it was used in AddImagesToDatasetDialog.

This restores a modern version of it, and adds a test.

Also fixes the issue of removing the old 180 projection when replacing the sample.

Testing

Added a system test for the case

Acceptance Criteria

Follow steps on #2315

Documentation

Release notes

coveralls commented 1 month ago

Coverage Status

coverage: 74.322% (-0.005%) from 74.327% when pulling ccfc1d0bcb204c604a411525af3e0c9214d9b62b on 2315-add-images into 31f6373f478ac8834dd7794960bfef820f519c2c on main.

samtygier-stfc commented 1 month ago

It can be done through File -> Load 180. So probably best not to add a special case here right now.

ashmeigh commented 1 month ago

I've tested the Add/Replace Stack dialog, and everything works as intended. Since the 180-degree stack can be added/replaced through the File -> Load 180 option, it makes sense not to include a special case for it in the dialog.