Skip to content

Commit

Permalink
Add docstring to _on_scale_moving_image
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorTatarnikov committed Feb 5, 2024
1 parent e61b07b commit fa9ee0f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions brainglobe_registration/registration_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,19 @@ def _on_sample_popup_about_to_show(self):
self.get_atlas_widget.update_sample_image_names(self._sample_images)

def _on_scale_moving_image(self, x: float, y: float):
"""
Scale the moving image to have resolution equal to the atlas.
Parameters
----------
x : float
Moving image x pixel size (> 0.0).
y : float
Moving image y pixel size (> 0.0).
Will show an error if the pixel sizes are less than or equal to 0.
Will show an error if the moving image or atlas is not selected.
"""
if x <= 0 or y <= 0:
show_error("Pixel sizes must be greater than 0")
return
Expand Down

0 comments on commit fa9ee0f

Please sign in to comment.