Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import header from brainglobe-utils #188

Merged
merged 2 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions brainreg/napari/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
from brainglobe_napari_io.brainmapper.brainmapper_reader_dir import (
load_registration,
)
from brainglobe_utils.qtpy.logo import header_widget
from fancylog import fancylog
from magicgui import magicgui
from napari._qt.qthreading import thread_worker
from napari.types import LayerDataTuple
from napari.utils.notifications import show_info
from qtpy.QtWidgets import QScrollArea

import brainreg as program_for_log
from brainreg.core.backend.niftyreg.run import run_niftyreg
Expand Down Expand Up @@ -218,6 +220,7 @@ def brainreg_register():
check_orientation_button=dict(
widget_type="PushButton", text="Check orientation"
),
scrollable=True,
)
def widget(
viewer: napari.Viewer,
Expand Down Expand Up @@ -594,4 +597,19 @@ def check_orientation(event=None):
scale=[s1, s2],
)

widget.native.layout().insertWidget(
0,
header_widget(
"brainreg",
"Automated 3D brain registration",
tutorial_file_name="tutorial-whole-brain-registration.html",
citation_doi="https://doi.org/10.1038/s41598-021-04676-9",
help_text="For help, hover the cursor over each parameter.",
),
)

scroll = QScrollArea()
scroll.setWidget(widget._widget._qwidget)
widget._widget._qwidget = scroll

return widget
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ requires-python = ">=3.9"
dependencies = [
"brainglobe-atlasapi>=2.0.1",
"brainglobe-space>=1.0.0",
"brainglobe-utils>=0.4.2",
"brainglobe-utils>=0.4.3",
"fancylog",
"numpy",
"scikit-image",
Expand Down
Loading