brainglobe / brainreg

Automated 3D brain registration with support for multiple species and atlases.
https://brainglobe.info/documentation/brainreg/index.html
BSD 3-Clause "New" or "Revised" License
121 stars 27 forks source link

Harmonise napari plugin and CLI entry points #193

Closed adamltyson closed 5 months ago

adamltyson commented 5 months ago

Description

This PR makes sure the outputs of the napari plugin and CLI are equal. Previously, as highlighted in #192 by @AdrianAriasAbreu, there were differences when running the same data in the napari plugin and CLI. +

Why is this PR needed? The plugin and CLI should be two ways of achieving the same thing.

What does this PR do?

  1. It ensures that the default parameters in the GUI are the same, are are displayed the same as the defaults in the CLI. Previously, some were made negative under the hood. This PR corrects this so everything matches.
  2. It downsamples data in the exact same way as brainglobe_utils.image_io.load.load_any() (as used by the CLI).

References

Closes #192 (I think)

How has this PR been tested?

The same data has been registered with the plugin and CLI and results confirmed to be the same. Existing tests pass.

Is this a breaking change?

No

Does this PR require an update to the documentation?

No, but I noticed some errors in the docs, updated in https://github.com/brainglobe/brainglobe.github.io/pull/170

Checklist:

adamltyson commented 5 months ago

I assume the tests are failing on macOS as those runners have recently been updated to ARM. #191 should fix this.

adamltyson commented 5 months ago

Good catch, thanks. I've set these to -99 which seems about right.

adamltyson commented 5 months ago

I think merge. This shouldn't (famous last words) affect only one OS.

adamltyson commented 5 months ago

Will hold off releasing until #191 though.