Skip to content

Commit

Permalink
Update use of brainglobe_utils image IO submodule (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamltyson authored May 15, 2024
1 parent 9198b13 commit 70d7511
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion brainreg/core/backend/niftyreg/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from brainglobe_atlasapi import BrainGlobeAtlas
from brainglobe_utils.general.system import delete_directory_contents
from brainglobe_utils.image.scale import scale_and_convert_to_16_bits
from brainglobe_utils.image_io import load_any, to_tiff
from brainglobe_utils.IO.image.load import load_any
from brainglobe_utils.IO.image.save import to_tiff

from brainreg.core.backend.niftyreg.parameters import RegistrationParams
from brainreg.core.backend.niftyreg.paths import NiftyRegPaths
Expand Down
2 changes: 1 addition & 1 deletion brainreg/core/backend/niftyreg/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from brainglobe_utils.image_io import to_nii
from brainglobe_utils.IO.image.save import to_nii


def save_nii(stack, atlas_pixel_sizes, dest_path):
Expand Down
2 changes: 1 addition & 1 deletion brainreg/core/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import brainglobe_space as bg
from brainglobe_atlasapi import BrainGlobeAtlas
from brainglobe_utils.general.system import get_num_processes
from brainglobe_utils.image_io import load_any
from brainglobe_utils.IO.image.load import load_any

from brainreg.core.backend.niftyreg.run import run_niftyreg
from brainreg.core.utils.boundaries import boundaries
Expand Down
3 changes: 2 additions & 1 deletion brainreg/core/utils/boundaries.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import logging

import numpy as np
from brainglobe_utils.image_io import load_any, to_tiff
from brainglobe_utils.IO.image.load import load_any
from brainglobe_utils.IO.image.save import to_tiff
from skimage.segmentation import find_boundaries


Expand Down
2 changes: 1 addition & 1 deletion brainreg/core/utils/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import numpy as np
import pandas as pd
from brainglobe_utils.image_io import load_any
from brainglobe_utils.IO.image.load import load_any
from brainglobe_utils.pandas.misc import initialise_df, safe_pandas_concat


Expand Down
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.3",
"brainglobe-utils>=0.5.0",
"fancylog",
"numpy",
"scikit-image",
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/test_integration/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import numpy as np
import pandas as pd
from brainglobe_utils.image_io import load_any
from brainglobe_utils.IO.image.load import load_any

relative_tolerance = 0.01
absolute_tolerance = 10
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/test_unit/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from pathlib import Path

import pytest
from brainglobe_utils.image_io.utils import ImageIOLoadException
from brainglobe_utils.IO.image.utils import ImageIOLoadException

from brainreg.core.cli import main as brainreg_run

Expand Down

0 comments on commit 70d7511

Please sign in to comment.