Skip to content

Commit

Permalink
parent_widget
Browse files Browse the repository at this point in the history
  • Loading branch information
saarah815 committed Aug 6, 2024
1 parent db57764 commit 9b5c274
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion brainglobe_registration/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from brainglobe_atlasapi.list_atlases import get_downloaded_atlases
from brainglobe_utils.qtpy.dialog import display_info
from pytransform3d.rotations import active_matrix_from_angle
from qtpy.QtWidgets import QWidget


def adjust_napari_image_layer(
Expand Down Expand Up @@ -159,10 +160,14 @@ def calculate_rotated_bounding_box(


def check_atlas_installed():
"""
Function checks if user has any atlases installed. If not, message box
appears in napari, directing user to download atlases via attached links.
"""
available_atlases = get_downloaded_atlases()
if len(available_atlases) == 0:
display_info(
widget=parent_widget,
widget=QWidget(),
title="Information",
message="No atlases available. Please download atlas(es) "
"using <a href='https://brainglobe.info/documentation/"
Expand Down

0 comments on commit 9b5c274

Please sign in to comment.