-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently, parts of the package list arguments using the xyz order which are then flipped to match the standard zyx. To avoid confusion and bugs, all parameters relating to the physical axes (not anatomical) should always be in the zyx order, and passed using a tuple where possible.
e.g. The below code snippet is confusing, and has a bug inside as the signal emits the scales in xyz order while the atlas resolutions are in zyx. The test only passes due to the symmetric nature of the atlas.
brainglobe-registration/tests/test_registration_widget.py
Lines 152 to 175 in 027493c
def test_scale_moving_image_2d( | |
make_napari_viewer_with_images, | |
registration_widget, | |
mocker, | |
x_scale_factor, | |
y_scale_factor, | |
): | |
mock_atlas = mocker.patch( | |
"brainglobe_registration.registration_widget.BrainGlobeAtlas" | |
) | |
mock_atlas.resolution = [20, 20, 20] | |
registration_widget._atlas = mock_atlas | |
current_size = registration_widget._moving_image.data.shape | |
registration_widget.adjust_moving_image_widget.scale_image_signal.emit( | |
mock_atlas.resolution[1] * x_scale_factor, | |
mock_atlas.resolution[2] * y_scale_factor, | |
0.001, | |
) | |
assert registration_widget._moving_image.data.shape == ( | |
current_size[0] * y_scale_factor, | |
current_size[1] * x_scale_factor, | |
) |
alessandrofelder
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request