Skip to content

Commit

Permalink
Moved run_registration to be imported just as run button is clicked t…
Browse files Browse the repository at this point in the history
…o avoid long boot times
  • Loading branch information
IgorTatarnikov committed Feb 6, 2024
1 parent 9bd9ca4 commit 8d4635b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion brainglobe_registration/registration_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from skimage.segmentation import find_boundaries
from skimage.transform import rescale

from brainglobe_registration.elastix.register import run_registration
from brainglobe_registration.utils.brainglobe_logo import header_widget
from brainglobe_registration.utils.utils import (
adjust_napari_image_layer,
Expand Down Expand Up @@ -221,6 +220,8 @@ def _on_adjust_moving_image_reset_button_click(self):
adjust_napari_image_layer(self._moving_image, 0, 0, 0)

def _on_run_button_click(self):
from brainglobe_registration.elastix.register import run_registration

current_atlas_slice = self._viewer.dims.current_step[0]

result, parameters, registered_annotation_image = run_registration(
Expand Down

0 comments on commit 8d4635b

Please sign in to comment.