From 23abdcca41b5c30368a409cd1caa66ef4e5287af Mon Sep 17 00:00:00 2001 From: Adam Tyson Date: Wed, 15 May 2024 14:28:12 +0100 Subject: [PATCH] Update use of brainio to brainglobe-utils (#288) --- .../atlas_generation/atlas_scripts/humanatlas.py | 8 +++----- .../atlas_generation/atlas_scripts/kim_mouse.py | 2 -- .../atlas_generation/atlas_scripts/perens_lsfm_mouse.py | 1 - 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/brainglobe_atlasapi/atlas_generation/atlas_scripts/humanatlas.py b/brainglobe_atlasapi/atlas_generation/atlas_scripts/humanatlas.py index a575bfa3..6f6a54bd 100644 --- a/brainglobe_atlasapi/atlas_generation/atlas_scripts/humanatlas.py +++ b/brainglobe_atlasapi/atlas_generation/atlas_scripts/humanatlas.py @@ -8,11 +8,9 @@ import treelib import urllib3 from allensdk.core.structure_tree import StructureTree -from brainio import brainio +from brainglobe_utils.IO.image.load import load_any from rich.progress import track -# import sys -# sys.path.append("./") from brainglobe_atlasapi.atlas_generation.mesh_utils import ( Region, create_region_mesh, @@ -99,8 +97,8 @@ def prune_tree(tree): # ---------------- # # GET TEMPLATE # # ---------------- # - annotation = brainio.load_any(annotations_image) # shape (394, 466, 378) - anatomy = brainio.load_any(anatomy_image) # shape (394, 466, 378) + annotation = load_any(annotations_image) # shape (394, 466, 378) + anatomy = load_any(anatomy_image) # shape (394, 466, 378) # Remove weird artefact annotation = annotation[:200, :, :] diff --git a/brainglobe_atlasapi/atlas_generation/atlas_scripts/kim_mouse.py b/brainglobe_atlasapi/atlas_generation/atlas_scripts/kim_mouse.py index 0482f4fb..93d8b60e 100644 --- a/brainglobe_atlasapi/atlas_generation/atlas_scripts/kim_mouse.py +++ b/brainglobe_atlasapi/atlas_generation/atlas_scripts/kim_mouse.py @@ -14,8 +14,6 @@ from rich.progress import track from scipy.ndimage import zoom -# import sys -# sys.path.append("./") from brainglobe_atlasapi import utils from brainglobe_atlasapi.atlas_generation.mesh_utils import ( Region, diff --git a/brainglobe_atlasapi/atlas_generation/atlas_scripts/perens_lsfm_mouse.py b/brainglobe_atlasapi/atlas_generation/atlas_scripts/perens_lsfm_mouse.py index 21d49777..cb70c5ee 100644 --- a/brainglobe_atlasapi/atlas_generation/atlas_scripts/perens_lsfm_mouse.py +++ b/brainglobe_atlasapi/atlas_generation/atlas_scripts/perens_lsfm_mouse.py @@ -11,7 +11,6 @@ import SimpleITK as sitk from rich.progress import track -# from allensdk.core.reference_space_cache import ReferenceSpaceCache from brainglobe_atlasapi import utils from brainglobe_atlasapi.atlas_generation.mesh_utils import ( Region,