From 0d811ccfa4835e64906a479bd655fc78c99dc564 Mon Sep 17 00:00:00 2001 From: Marcel Rosier Date: Thu, 7 Nov 2024 11:38:50 +0100 Subject: [PATCH 1/3] Install antspyx by default --- pyproject.toml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1b819eb..930571b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ exclude = [ ] name = "brainles_preprocessing" -version = "0.0.0" # will be overwritten by poetry-dynamic-versioning but needs to be set +version = "0.0.0" # will be overwritten by poetry-dynamic-versioning but needs to be set description = "Tool for preprocessing tasks in biomedical imaging, with a focus on (but not limited to) multi-modal brain MRI" license = "Apache-2.0" @@ -55,6 +55,9 @@ pathlib = "^1.0.1" nibabel = ">=3.2.1" numpy = "^1.23.0" +# registration +antspyx = "^0.4.2" + # hd-bet reqs brainles_hd_bet = ">=0.0.8" @@ -64,13 +67,11 @@ auxiliary = ">=0.0.42" rich = "^13.6.0" # optional registration backends -antspyx = { version = "^0.4.2", optional = true } ereg = { version = "^0.0.10", optional = true } [tool.poetry.extras] -all = ["antspyx", "ereg"] -ants = ["antspyx"] +all = ["ereg"] ereg = ["ereg"] From 7ecb01803c22dd6026f9dbac8abe6db48f36f4f9 Mon Sep 17 00:00:00 2001 From: Marcel Rosier Date: Thu, 7 Nov 2024 11:44:43 +0100 Subject: [PATCH 2/3] Remove irrelevant warning --- brainles_preprocessing/registration/__init__.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/brainles_preprocessing/registration/__init__.py b/brainles_preprocessing/registration/__init__.py index 4c941cc..09752ee 100644 --- a/brainles_preprocessing/registration/__init__.py +++ b/brainles_preprocessing/registration/__init__.py @@ -1,12 +1,5 @@ import warnings -try: - from .ANTs.ANTs import ANTsRegistrator -except ImportError: - warnings.warn( - "ANTS package not found. If you want to use it, please install it using 'pip install brainles_preprocessing[ants]'" - ) - try: from .eReg.eReg import eRegRegistrator except ImportError: From 00e94c97b7eafcd594ee5bd2c1497c2a0516d5a9 Mon Sep 17 00:00:00 2001 From: Marcel Rosier Date: Mon, 11 Nov 2024 09:40:52 +0100 Subject: [PATCH 3/3] Read warning --- brainles_preprocessing/registration/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/brainles_preprocessing/registration/__init__.py b/brainles_preprocessing/registration/__init__.py index 09752ee..e3a9d7d 100644 --- a/brainles_preprocessing/registration/__init__.py +++ b/brainles_preprocessing/registration/__init__.py @@ -1,5 +1,13 @@ import warnings + +try: + from .ANTs.ANTs import ANTsRegistrator +except ImportError: + warnings.warn( + "ANTS package not found. If you want to use it, please install it using 'pip install antspyx'" + ) + try: from .eReg.eReg import eRegRegistrator except ImportError: