junifer 0.0.5.dev240__py3-none-any.whl → 0.0.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- junifer/__init__.py +2 -31
- junifer/__init__.pyi +37 -0
- junifer/_version.py +9 -4
- junifer/api/__init__.py +3 -5
- junifer/api/__init__.pyi +4 -0
- junifer/api/decorators.py +14 -19
- junifer/api/functions.py +165 -109
- junifer/api/py.typed +0 -0
- junifer/api/queue_context/__init__.py +2 -4
- junifer/api/queue_context/__init__.pyi +5 -0
- junifer/api/queue_context/gnu_parallel_local_adapter.py +22 -6
- junifer/api/queue_context/htcondor_adapter.py +23 -6
- junifer/api/queue_context/py.typed +0 -0
- junifer/api/queue_context/tests/test_gnu_parallel_local_adapter.py +3 -3
- junifer/api/queue_context/tests/test_htcondor_adapter.py +3 -3
- junifer/api/tests/test_functions.py +168 -74
- junifer/cli/__init__.py +24 -0
- junifer/cli/__init__.pyi +3 -0
- junifer/{api → cli}/cli.py +141 -125
- junifer/cli/parser.py +235 -0
- junifer/cli/py.typed +0 -0
- junifer/{api → cli}/tests/test_cli.py +8 -8
- junifer/{api/tests/test_api_utils.py → cli/tests/test_cli_utils.py} +5 -4
- junifer/{api → cli}/tests/test_parser.py +2 -2
- junifer/{api → cli}/utils.py +6 -16
- junifer/configs/juseless/__init__.py +2 -2
- junifer/configs/juseless/__init__.pyi +3 -0
- junifer/configs/juseless/datagrabbers/__init__.py +2 -12
- junifer/configs/juseless/datagrabbers/__init__.pyi +13 -0
- junifer/configs/juseless/datagrabbers/ixi_vbm.py +2 -2
- junifer/configs/juseless/datagrabbers/py.typed +0 -0
- junifer/configs/juseless/datagrabbers/tests/test_ucla.py +2 -2
- junifer/configs/juseless/datagrabbers/ucla.py +4 -4
- junifer/configs/juseless/py.typed +0 -0
- junifer/conftest.py +25 -0
- junifer/data/__init__.py +2 -42
- junifer/data/__init__.pyi +29 -0
- junifer/data/_dispatch.py +248 -0
- junifer/data/coordinates/__init__.py +9 -0
- junifer/data/coordinates/__init__.pyi +5 -0
- junifer/data/coordinates/_ants_coordinates_warper.py +104 -0
- junifer/data/coordinates/_coordinates.py +385 -0
- junifer/data/coordinates/_fsl_coordinates_warper.py +81 -0
- junifer/data/{tests → coordinates/tests}/test_coordinates.py +26 -33
- junifer/data/masks/__init__.py +9 -0
- junifer/data/masks/__init__.pyi +6 -0
- junifer/data/masks/_ants_mask_warper.py +177 -0
- junifer/data/masks/_fsl_mask_warper.py +106 -0
- junifer/data/masks/_masks.py +802 -0
- junifer/data/{tests → masks/tests}/test_masks.py +67 -63
- junifer/data/parcellations/__init__.py +9 -0
- junifer/data/parcellations/__init__.pyi +6 -0
- junifer/data/parcellations/_ants_parcellation_warper.py +166 -0
- junifer/data/parcellations/_fsl_parcellation_warper.py +89 -0
- junifer/data/parcellations/_parcellations.py +1388 -0
- junifer/data/{tests → parcellations/tests}/test_parcellations.py +165 -295
- junifer/data/pipeline_data_registry_base.py +76 -0
- junifer/data/py.typed +0 -0
- junifer/data/template_spaces.py +44 -79
- junifer/data/tests/test_data_utils.py +1 -2
- junifer/data/tests/test_template_spaces.py +8 -4
- junifer/data/utils.py +109 -4
- junifer/datagrabber/__init__.py +2 -26
- junifer/datagrabber/__init__.pyi +27 -0
- junifer/datagrabber/aomic/__init__.py +2 -4
- junifer/datagrabber/aomic/__init__.pyi +5 -0
- junifer/datagrabber/aomic/id1000.py +81 -52
- junifer/datagrabber/aomic/piop1.py +83 -55
- junifer/datagrabber/aomic/piop2.py +85 -56
- junifer/datagrabber/aomic/py.typed +0 -0
- junifer/datagrabber/aomic/tests/test_id1000.py +19 -12
- junifer/datagrabber/aomic/tests/test_piop1.py +52 -18
- junifer/datagrabber/aomic/tests/test_piop2.py +50 -17
- junifer/datagrabber/base.py +22 -18
- junifer/datagrabber/datalad_base.py +71 -34
- junifer/datagrabber/dmcc13_benchmark.py +31 -18
- junifer/datagrabber/hcp1200/__init__.py +2 -3
- junifer/datagrabber/hcp1200/__init__.pyi +4 -0
- junifer/datagrabber/hcp1200/datalad_hcp1200.py +3 -3
- junifer/datagrabber/hcp1200/hcp1200.py +26 -15
- junifer/datagrabber/hcp1200/py.typed +0 -0
- junifer/datagrabber/hcp1200/tests/test_hcp1200.py +8 -2
- junifer/datagrabber/multiple.py +14 -9
- junifer/datagrabber/pattern.py +132 -96
- junifer/datagrabber/pattern_validation_mixin.py +206 -94
- junifer/datagrabber/py.typed +0 -0
- junifer/datagrabber/tests/test_datalad_base.py +27 -12
- junifer/datagrabber/tests/test_dmcc13_benchmark.py +28 -11
- junifer/datagrabber/tests/test_multiple.py +48 -2
- junifer/datagrabber/tests/test_pattern_datalad.py +1 -1
- junifer/datagrabber/tests/test_pattern_validation_mixin.py +6 -6
- junifer/datareader/__init__.py +2 -2
- junifer/datareader/__init__.pyi +3 -0
- junifer/datareader/default.py +6 -6
- junifer/datareader/py.typed +0 -0
- junifer/external/nilearn/__init__.py +2 -3
- junifer/external/nilearn/__init__.pyi +4 -0
- junifer/external/nilearn/junifer_connectivity_measure.py +25 -17
- junifer/external/nilearn/junifer_nifti_spheres_masker.py +4 -4
- junifer/external/nilearn/py.typed +0 -0
- junifer/external/nilearn/tests/test_junifer_connectivity_measure.py +17 -16
- junifer/external/nilearn/tests/test_junifer_nifti_spheres_masker.py +2 -3
- junifer/markers/__init__.py +2 -38
- junifer/markers/__init__.pyi +37 -0
- junifer/markers/base.py +11 -14
- junifer/markers/brainprint.py +12 -14
- junifer/markers/complexity/__init__.py +2 -18
- junifer/markers/complexity/__init__.pyi +17 -0
- junifer/markers/complexity/complexity_base.py +9 -11
- junifer/markers/complexity/hurst_exponent.py +7 -7
- junifer/markers/complexity/multiscale_entropy_auc.py +7 -7
- junifer/markers/complexity/perm_entropy.py +7 -7
- junifer/markers/complexity/py.typed +0 -0
- junifer/markers/complexity/range_entropy.py +7 -7
- junifer/markers/complexity/range_entropy_auc.py +7 -7
- junifer/markers/complexity/sample_entropy.py +7 -7
- junifer/markers/complexity/tests/test_complexity_base.py +1 -1
- junifer/markers/complexity/tests/test_hurst_exponent.py +5 -5
- junifer/markers/complexity/tests/test_multiscale_entropy_auc.py +5 -5
- junifer/markers/complexity/tests/test_perm_entropy.py +5 -5
- junifer/markers/complexity/tests/test_range_entropy.py +5 -5
- junifer/markers/complexity/tests/test_range_entropy_auc.py +5 -5
- junifer/markers/complexity/tests/test_sample_entropy.py +5 -5
- junifer/markers/complexity/tests/test_weighted_perm_entropy.py +5 -5
- junifer/markers/complexity/weighted_perm_entropy.py +7 -7
- junifer/markers/ets_rss.py +12 -11
- junifer/markers/falff/__init__.py +2 -3
- junifer/markers/falff/__init__.pyi +4 -0
- junifer/markers/falff/_afni_falff.py +38 -45
- junifer/markers/falff/_junifer_falff.py +16 -19
- junifer/markers/falff/falff_base.py +7 -11
- junifer/markers/falff/falff_parcels.py +9 -9
- junifer/markers/falff/falff_spheres.py +8 -8
- junifer/markers/falff/py.typed +0 -0
- junifer/markers/falff/tests/test_falff_spheres.py +3 -1
- junifer/markers/functional_connectivity/__init__.py +2 -12
- junifer/markers/functional_connectivity/__init__.pyi +13 -0
- junifer/markers/functional_connectivity/crossparcellation_functional_connectivity.py +9 -8
- junifer/markers/functional_connectivity/edge_functional_connectivity_parcels.py +8 -8
- junifer/markers/functional_connectivity/edge_functional_connectivity_spheres.py +7 -7
- junifer/markers/functional_connectivity/functional_connectivity_base.py +13 -12
- junifer/markers/functional_connectivity/functional_connectivity_parcels.py +8 -8
- junifer/markers/functional_connectivity/functional_connectivity_spheres.py +7 -7
- junifer/markers/functional_connectivity/py.typed +0 -0
- junifer/markers/functional_connectivity/tests/test_edge_functional_connectivity_parcels.py +1 -2
- junifer/markers/functional_connectivity/tests/test_edge_functional_connectivity_spheres.py +1 -2
- junifer/markers/functional_connectivity/tests/test_functional_connectivity_parcels.py +6 -6
- junifer/markers/functional_connectivity/tests/test_functional_connectivity_spheres.py +5 -5
- junifer/markers/parcel_aggregation.py +22 -17
- junifer/markers/py.typed +0 -0
- junifer/markers/reho/__init__.py +2 -3
- junifer/markers/reho/__init__.pyi +4 -0
- junifer/markers/reho/_afni_reho.py +29 -35
- junifer/markers/reho/_junifer_reho.py +13 -14
- junifer/markers/reho/py.typed +0 -0
- junifer/markers/reho/reho_base.py +7 -11
- junifer/markers/reho/reho_parcels.py +10 -10
- junifer/markers/reho/reho_spheres.py +9 -9
- junifer/markers/sphere_aggregation.py +22 -17
- junifer/markers/temporal_snr/__init__.py +2 -3
- junifer/markers/temporal_snr/__init__.pyi +4 -0
- junifer/markers/temporal_snr/py.typed +0 -0
- junifer/markers/temporal_snr/temporal_snr_base.py +11 -10
- junifer/markers/temporal_snr/temporal_snr_parcels.py +8 -8
- junifer/markers/temporal_snr/temporal_snr_spheres.py +7 -7
- junifer/markers/tests/test_ets_rss.py +3 -3
- junifer/markers/tests/test_parcel_aggregation.py +24 -24
- junifer/markers/tests/test_sphere_aggregation.py +6 -6
- junifer/markers/utils.py +3 -3
- junifer/onthefly/__init__.py +2 -1
- junifer/onthefly/_brainprint.py +138 -0
- junifer/onthefly/read_transform.py +5 -8
- junifer/pipeline/__init__.py +2 -10
- junifer/pipeline/__init__.pyi +13 -0
- junifer/{markers/collection.py → pipeline/marker_collection.py} +8 -14
- junifer/pipeline/pipeline_component_registry.py +294 -0
- junifer/pipeline/pipeline_step_mixin.py +15 -11
- junifer/pipeline/py.typed +0 -0
- junifer/{markers/tests/test_collection.py → pipeline/tests/test_marker_collection.py} +2 -3
- junifer/pipeline/tests/test_pipeline_component_registry.py +200 -0
- junifer/pipeline/tests/test_pipeline_step_mixin.py +36 -37
- junifer/pipeline/tests/test_update_meta_mixin.py +4 -4
- junifer/pipeline/tests/test_workdir_manager.py +43 -0
- junifer/pipeline/update_meta_mixin.py +21 -17
- junifer/pipeline/utils.py +6 -6
- junifer/pipeline/workdir_manager.py +19 -5
- junifer/preprocess/__init__.py +2 -10
- junifer/preprocess/__init__.pyi +11 -0
- junifer/preprocess/base.py +10 -10
- junifer/preprocess/confounds/__init__.py +2 -2
- junifer/preprocess/confounds/__init__.pyi +3 -0
- junifer/preprocess/confounds/fmriprep_confound_remover.py +243 -64
- junifer/preprocess/confounds/py.typed +0 -0
- junifer/preprocess/confounds/tests/test_fmriprep_confound_remover.py +121 -14
- junifer/preprocess/py.typed +0 -0
- junifer/preprocess/smoothing/__init__.py +2 -2
- junifer/preprocess/smoothing/__init__.pyi +3 -0
- junifer/preprocess/smoothing/_afni_smoothing.py +40 -40
- junifer/preprocess/smoothing/_fsl_smoothing.py +22 -32
- junifer/preprocess/smoothing/_nilearn_smoothing.py +35 -14
- junifer/preprocess/smoothing/py.typed +0 -0
- junifer/preprocess/smoothing/smoothing.py +11 -13
- junifer/preprocess/warping/__init__.py +2 -2
- junifer/preprocess/warping/__init__.pyi +3 -0
- junifer/preprocess/warping/_ants_warper.py +136 -32
- junifer/preprocess/warping/_fsl_warper.py +73 -22
- junifer/preprocess/warping/py.typed +0 -0
- junifer/preprocess/warping/space_warper.py +39 -11
- junifer/preprocess/warping/tests/test_space_warper.py +5 -9
- junifer/py.typed +0 -0
- junifer/stats.py +5 -5
- junifer/storage/__init__.py +2 -10
- junifer/storage/__init__.pyi +11 -0
- junifer/storage/base.py +47 -13
- junifer/storage/hdf5.py +95 -33
- junifer/storage/pandas_base.py +12 -11
- junifer/storage/py.typed +0 -0
- junifer/storage/sqlite.py +11 -11
- junifer/storage/tests/test_hdf5.py +86 -4
- junifer/storage/tests/test_sqlite.py +2 -2
- junifer/storage/tests/test_storage_base.py +5 -2
- junifer/storage/tests/test_utils.py +33 -7
- junifer/storage/utils.py +95 -9
- junifer/testing/__init__.py +2 -3
- junifer/testing/__init__.pyi +4 -0
- junifer/testing/datagrabbers.py +10 -11
- junifer/testing/py.typed +0 -0
- junifer/testing/registry.py +4 -7
- junifer/testing/tests/test_testing_registry.py +9 -17
- junifer/tests/test_stats.py +2 -2
- junifer/typing/__init__.py +9 -0
- junifer/typing/__init__.pyi +31 -0
- junifer/typing/_typing.py +68 -0
- junifer/utils/__init__.py +2 -12
- junifer/utils/__init__.pyi +18 -0
- junifer/utils/_config.py +110 -0
- junifer/utils/_yaml.py +16 -0
- junifer/utils/helpers.py +6 -6
- junifer/utils/logging.py +117 -8
- junifer/utils/py.typed +0 -0
- junifer/{pipeline → utils}/singleton.py +19 -14
- junifer/utils/tests/test_config.py +59 -0
- {junifer-0.0.5.dev240.dist-info → junifer-0.0.6.dist-info}/METADATA +43 -38
- junifer-0.0.6.dist-info/RECORD +350 -0
- {junifer-0.0.5.dev240.dist-info → junifer-0.0.6.dist-info}/WHEEL +1 -1
- junifer-0.0.6.dist-info/entry_points.txt +2 -0
- junifer/api/parser.py +0 -118
- junifer/data/coordinates.py +0 -408
- junifer/data/masks.py +0 -670
- junifer/data/parcellations.py +0 -1828
- junifer/pipeline/registry.py +0 -177
- junifer/pipeline/tests/test_registry.py +0 -150
- junifer-0.0.5.dev240.dist-info/RECORD +0 -275
- junifer-0.0.5.dev240.dist-info/entry_points.txt +0 -2
- /junifer/{api → cli}/tests/data/gmd_mean.yaml +0 -0
- /junifer/{api → cli}/tests/data/gmd_mean_htcondor.yaml +0 -0
- /junifer/{api → cli}/tests/data/partly_cloudy_agg_mean_tian.yml +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/AutobiographicalMemory_VOIs.txt +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/CogAC_VOIs.txt +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/CogAR_VOIs.txt +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/DMNBuckner_VOIs.txt +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/Dosenbach2010_MNI_VOIs.txt +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/Empathy_VOIs.txt +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/Motor_VOIs.txt +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/MultiTask_VOIs.txt +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/PhysioStress_VOIs.txt +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/Power2011_MNI_VOIs.txt +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/Power2013_MNI_VOIs.tsv +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/Rew_VOIs.txt +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/Somatosensory_VOIs.txt +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/ToM_VOIs.txt +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/VigAtt_VOIs.txt +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/WM_VOIs.txt +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/eMDN_VOIs.txt +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/eSAD_VOIs.txt +0 -0
- /junifer/data/{VOIs → coordinates/VOIs}/meta/extDMN_VOIs.txt +0 -0
- {junifer-0.0.5.dev240.dist-info → junifer-0.0.6.dist-info/licenses}/AUTHORS.rst +0 -0
- {junifer-0.0.5.dev240.dist-info → junifer-0.0.6.dist-info/licenses}/LICENSE.md +0 -0
- {junifer-0.0.5.dev240.dist-info → junifer-0.0.6.dist-info}/top_level.txt +0 -0
@@ -5,11 +5,12 @@
|
|
5
5
|
|
6
6
|
|
7
7
|
from abc import abstractmethod
|
8
|
-
from typing import Any, ClassVar,
|
8
|
+
from typing import Any, ClassVar, Optional, Union
|
9
9
|
|
10
10
|
from sklearn.covariance import EmpiricalCovariance, LedoitWolf
|
11
11
|
|
12
12
|
from ...external.nilearn import JuniferConnectivityMeasure
|
13
|
+
from ...typing import Dependencies, MarkerInOutMappings
|
13
14
|
from ...utils import raise_error
|
14
15
|
from ..base import BaseMarker
|
15
16
|
|
@@ -51,9 +52,9 @@ class FunctionalConnectivityBase(BaseMarker):
|
|
51
52
|
|
52
53
|
"""
|
53
54
|
|
54
|
-
_DEPENDENCIES: ClassVar[
|
55
|
+
_DEPENDENCIES: ClassVar[Dependencies] = {"nilearn", "scikit-learn"}
|
55
56
|
|
56
|
-
_MARKER_INOUT_MAPPINGS: ClassVar[
|
57
|
+
_MARKER_INOUT_MAPPINGS: ClassVar[MarkerInOutMappings] = {
|
57
58
|
"BOLD": {
|
58
59
|
"functional_connectivity": "matrix",
|
59
60
|
},
|
@@ -62,10 +63,10 @@ class FunctionalConnectivityBase(BaseMarker):
|
|
62
63
|
def __init__(
|
63
64
|
self,
|
64
65
|
agg_method: str = "mean",
|
65
|
-
agg_method_params: Optional[
|
66
|
+
agg_method_params: Optional[dict] = None,
|
66
67
|
conn_method: str = "correlation",
|
67
|
-
conn_method_params: Optional[
|
68
|
-
masks: Union[str,
|
68
|
+
conn_method_params: Optional[dict] = None,
|
69
|
+
masks: Union[str, dict, list[Union[dict, str]], None] = None,
|
69
70
|
name: Optional[str] = None,
|
70
71
|
) -> None:
|
71
72
|
self.agg_method = agg_method
|
@@ -82,9 +83,9 @@ class FunctionalConnectivityBase(BaseMarker):
|
|
82
83
|
@abstractmethod
|
83
84
|
def aggregate(
|
84
85
|
self,
|
85
|
-
input:
|
86
|
-
extra_input: Optional[
|
87
|
-
) ->
|
86
|
+
input: dict[str, Any],
|
87
|
+
extra_input: Optional[dict[str, Any]] = None,
|
88
|
+
) -> dict[str, Any]:
|
88
89
|
"""Perform aggregation."""
|
89
90
|
raise_error(
|
90
91
|
msg="Concrete classes need to implement aggregate().",
|
@@ -93,9 +94,9 @@ class FunctionalConnectivityBase(BaseMarker):
|
|
93
94
|
|
94
95
|
def compute(
|
95
96
|
self,
|
96
|
-
input:
|
97
|
-
extra_input: Optional[
|
98
|
-
) ->
|
97
|
+
input: dict[str, Any],
|
98
|
+
extra_input: Optional[dict] = None,
|
99
|
+
) -> dict:
|
99
100
|
"""Compute.
|
100
101
|
|
101
102
|
Parameters
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# Synchon Mandal <s.mandal@fz-juelich.de>
|
6
6
|
# License: AGPL
|
7
7
|
|
8
|
-
from typing import Any,
|
8
|
+
from typing import Any, Optional, Union
|
9
9
|
|
10
10
|
from ...api.decorators import register_marker
|
11
11
|
from ..parcel_aggregation import ParcelAggregation
|
@@ -23,7 +23,7 @@ class FunctionalConnectivityParcels(FunctionalConnectivityBase):
|
|
23
23
|
----------
|
24
24
|
parcellation : str or list of str
|
25
25
|
The name(s) of the parcellation(s) to use.
|
26
|
-
See :func:`.
|
26
|
+
See :func:`.list_data` for options.
|
27
27
|
agg_method : str, optional
|
28
28
|
The method to perform aggregation using.
|
29
29
|
See :func:`.get_aggfunc_by_name` for options
|
@@ -55,12 +55,12 @@ class FunctionalConnectivityParcels(FunctionalConnectivityBase):
|
|
55
55
|
|
56
56
|
def __init__(
|
57
57
|
self,
|
58
|
-
parcellation: Union[str,
|
58
|
+
parcellation: Union[str, list[str]],
|
59
59
|
agg_method: str = "mean",
|
60
|
-
agg_method_params: Optional[
|
60
|
+
agg_method_params: Optional[dict] = None,
|
61
61
|
conn_method: str = "correlation",
|
62
|
-
conn_method_params: Optional[
|
63
|
-
masks: Union[str,
|
62
|
+
conn_method_params: Optional[dict] = None,
|
63
|
+
masks: Union[str, dict, list[Union[dict, str]], None] = None,
|
64
64
|
name: Optional[str] = None,
|
65
65
|
) -> None:
|
66
66
|
self.parcellation = parcellation
|
@@ -74,8 +74,8 @@ class FunctionalConnectivityParcels(FunctionalConnectivityBase):
|
|
74
74
|
)
|
75
75
|
|
76
76
|
def aggregate(
|
77
|
-
self, input:
|
78
|
-
) ->
|
77
|
+
self, input: dict[str, Any], extra_input: Optional[dict] = None
|
78
|
+
) -> dict:
|
79
79
|
"""Perform parcel aggregation.
|
80
80
|
|
81
81
|
Parameters
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# Synchon Mandal <s.mandal@fz-juelich.de>
|
6
6
|
# License: AGPL
|
7
7
|
|
8
|
-
from typing import Any,
|
8
|
+
from typing import Any, Optional, Union
|
9
9
|
|
10
10
|
from ...api.decorators import register_marker
|
11
11
|
from ..sphere_aggregation import SphereAggregation
|
@@ -24,7 +24,7 @@ class FunctionalConnectivitySpheres(FunctionalConnectivityBase):
|
|
24
24
|
----------
|
25
25
|
coords : str
|
26
26
|
The name of the coordinates list to use.
|
27
|
-
See :func:`.
|
27
|
+
See :func:`.list_data` for options.
|
28
28
|
radius : positive float, optional
|
29
29
|
The radius of the sphere around each coordinates in millimetres.
|
30
30
|
If None, the signal will be extracted from a single voxel.
|
@@ -68,10 +68,10 @@ class FunctionalConnectivitySpheres(FunctionalConnectivityBase):
|
|
68
68
|
radius: Optional[float] = None,
|
69
69
|
allow_overlap: bool = False,
|
70
70
|
agg_method: str = "mean",
|
71
|
-
agg_method_params: Optional[
|
71
|
+
agg_method_params: Optional[dict] = None,
|
72
72
|
conn_method: str = "correlation",
|
73
|
-
conn_method_params: Optional[
|
74
|
-
masks: Union[str,
|
73
|
+
conn_method_params: Optional[dict] = None,
|
74
|
+
masks: Union[str, dict, list[Union[dict, str]], None] = None,
|
75
75
|
name: Optional[str] = None,
|
76
76
|
) -> None:
|
77
77
|
self.coords = coords
|
@@ -89,8 +89,8 @@ class FunctionalConnectivitySpheres(FunctionalConnectivityBase):
|
|
89
89
|
)
|
90
90
|
|
91
91
|
def aggregate(
|
92
|
-
self, input:
|
93
|
-
) ->
|
92
|
+
self, input: dict[str, Any], extra_input: Optional[dict] = None
|
93
|
+
) -> dict:
|
94
94
|
"""Perform sphere aggregation.
|
95
95
|
|
96
96
|
Parameters
|
File without changes
|
@@ -5,7 +5,6 @@
|
|
5
5
|
# License: AGPL
|
6
6
|
|
7
7
|
from pathlib import Path
|
8
|
-
from typing import Dict
|
9
8
|
|
10
9
|
import pytest
|
11
10
|
|
@@ -24,7 +23,7 @@ from junifer.testing.datagrabbers import PartlyCloudyTestingDataGrabber
|
|
24
23
|
)
|
25
24
|
def test_EdgeCentricFCParcels(
|
26
25
|
tmp_path: Path,
|
27
|
-
conn_method_params:
|
26
|
+
conn_method_params: dict[str, bool],
|
28
27
|
) -> None:
|
29
28
|
"""Test EdgeCentricFCParcels.
|
30
29
|
|
@@ -5,7 +5,6 @@
|
|
5
5
|
# License: AGPL
|
6
6
|
|
7
7
|
from pathlib import Path
|
8
|
-
from typing import Dict
|
9
8
|
|
10
9
|
import pytest
|
11
10
|
|
@@ -24,7 +23,7 @@ from junifer.testing.datagrabbers import SPMAuditoryTestingDataGrabber
|
|
24
23
|
)
|
25
24
|
def test_EdgeCentricFCSpheres(
|
26
25
|
tmp_path: Path,
|
27
|
-
conn_method_params:
|
26
|
+
conn_method_params: dict[str, bool],
|
28
27
|
) -> None:
|
29
28
|
"""Test EdgeCentricFCSpheres.
|
30
29
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
# License: AGPL
|
7
7
|
|
8
8
|
from pathlib import Path
|
9
|
-
from typing import TYPE_CHECKING
|
9
|
+
from typing import TYPE_CHECKING
|
10
10
|
|
11
11
|
import pytest
|
12
12
|
from nilearn.connectome import ConnectivityMeasure
|
@@ -14,7 +14,7 @@ from nilearn.maskers import NiftiLabelsMasker
|
|
14
14
|
from numpy.testing import assert_array_almost_equal
|
15
15
|
from sklearn.covariance import EmpiricalCovariance, LedoitWolf
|
16
16
|
|
17
|
-
from junifer.data import
|
17
|
+
from junifer.data import ParcellationRegistry
|
18
18
|
from junifer.datareader import DefaultDataReader
|
19
19
|
from junifer.markers.functional_connectivity import (
|
20
20
|
FunctionalConnectivityParcels,
|
@@ -36,8 +36,8 @@ if TYPE_CHECKING:
|
|
36
36
|
)
|
37
37
|
def test_FunctionalConnectivityParcels(
|
38
38
|
tmp_path: Path,
|
39
|
-
conn_method_params:
|
40
|
-
cov_estimator:
|
39
|
+
conn_method_params: dict[str, bool],
|
40
|
+
cov_estimator: type["BaseEstimator"],
|
41
41
|
) -> None:
|
42
42
|
"""Test FunctionalConnectivityParcels.
|
43
43
|
|
@@ -78,8 +78,8 @@ def test_FunctionalConnectivityParcels(
|
|
78
78
|
|
79
79
|
# Compare with nilearn
|
80
80
|
# Load testing parcellation for the target data
|
81
|
-
testing_parcellation, _ =
|
82
|
-
|
81
|
+
testing_parcellation, _ = ParcellationRegistry().get(
|
82
|
+
parcellations=["TianxS1x3TxMNInonlinear2009cAsym"],
|
83
83
|
target_data=element_data["BOLD"],
|
84
84
|
)
|
85
85
|
# Extract timeseries
|
@@ -7,7 +7,7 @@
|
|
7
7
|
# License: AGPL
|
8
8
|
|
9
9
|
from pathlib import Path
|
10
|
-
from typing import TYPE_CHECKING
|
10
|
+
from typing import TYPE_CHECKING
|
11
11
|
|
12
12
|
import pytest
|
13
13
|
from nilearn.connectome import ConnectivityMeasure
|
@@ -15,7 +15,7 @@ from nilearn.maskers import NiftiSpheresMasker
|
|
15
15
|
from numpy.testing import assert_array_almost_equal
|
16
16
|
from sklearn.covariance import EmpiricalCovariance, LedoitWolf
|
17
17
|
|
18
|
-
from junifer.data import
|
18
|
+
from junifer.data import CoordinatesRegistry
|
19
19
|
from junifer.datareader import DefaultDataReader
|
20
20
|
from junifer.markers.functional_connectivity import (
|
21
21
|
FunctionalConnectivitySpheres,
|
@@ -37,8 +37,8 @@ if TYPE_CHECKING:
|
|
37
37
|
)
|
38
38
|
def test_FunctionalConnectivitySpheres(
|
39
39
|
tmp_path: Path,
|
40
|
-
conn_method_params:
|
41
|
-
cov_estimator:
|
40
|
+
conn_method_params: dict[str, bool],
|
41
|
+
cov_estimator: type["BaseEstimator"],
|
42
42
|
) -> None:
|
43
43
|
"""Test FunctionalConnectivitySpheres.
|
44
44
|
|
@@ -80,7 +80,7 @@ def test_FunctionalConnectivitySpheres(
|
|
80
80
|
|
81
81
|
# Compare with nilearn
|
82
82
|
# Load testing coordinates for the target data
|
83
|
-
testing_coords, _ =
|
83
|
+
testing_coords, _ = CoordinatesRegistry().get(
|
84
84
|
coords="DMNBuckner", target_data=element_data["BOLD"]
|
85
85
|
)
|
86
86
|
# Extract timeseries
|
@@ -4,15 +4,16 @@
|
|
4
4
|
# Synchon Mandal <s.mandal@fz-juelich.de>
|
5
5
|
# License: AGPL
|
6
6
|
|
7
|
-
from typing import Any, ClassVar,
|
7
|
+
from typing import Any, ClassVar, Optional, Union
|
8
8
|
|
9
9
|
import numpy as np
|
10
10
|
from nilearn.image import math_img
|
11
11
|
from nilearn.maskers import NiftiMasker
|
12
12
|
|
13
13
|
from ..api.decorators import register_marker
|
14
|
-
from ..data import
|
14
|
+
from ..data import get_data
|
15
15
|
from ..stats import get_aggfunc_by_name
|
16
|
+
from ..typing import Dependencies, MarkerInOutMappings
|
16
17
|
from ..utils import logger, raise_error, warn_with_log
|
17
18
|
from .base import BaseMarker
|
18
19
|
|
@@ -27,8 +28,8 @@ class ParcelAggregation(BaseMarker):
|
|
27
28
|
Parameters
|
28
29
|
----------
|
29
30
|
parcellation : str or list of str
|
30
|
-
The name(s) of the parcellation(s)
|
31
|
-
:func:`.
|
31
|
+
The name(s) of the parcellation(s) to use.
|
32
|
+
See :func:`.list_data` for options.
|
32
33
|
method : str
|
33
34
|
The method to perform aggregation using. Check valid options in
|
34
35
|
:func:`.get_aggfunc_by_name`.
|
@@ -61,9 +62,9 @@ class ParcelAggregation(BaseMarker):
|
|
61
62
|
|
62
63
|
"""
|
63
64
|
|
64
|
-
_DEPENDENCIES: ClassVar[
|
65
|
+
_DEPENDENCIES: ClassVar[Dependencies] = {"nilearn", "numpy"}
|
65
66
|
|
66
|
-
_MARKER_INOUT_MAPPINGS: ClassVar[
|
67
|
+
_MARKER_INOUT_MAPPINGS: ClassVar[MarkerInOutMappings] = {
|
67
68
|
"T1w": {
|
68
69
|
"aggregation": "vector",
|
69
70
|
},
|
@@ -95,13 +96,13 @@ class ParcelAggregation(BaseMarker):
|
|
95
96
|
|
96
97
|
def __init__(
|
97
98
|
self,
|
98
|
-
parcellation: Union[str,
|
99
|
+
parcellation: Union[str, list[str]],
|
99
100
|
method: str,
|
100
|
-
method_params: Optional[
|
101
|
+
method_params: Optional[dict[str, Any]] = None,
|
101
102
|
time_method: Optional[str] = None,
|
102
|
-
time_method_params: Optional[
|
103
|
-
masks: Union[str,
|
104
|
-
on: Union[
|
103
|
+
time_method_params: Optional[dict[str, Any]] = None,
|
104
|
+
masks: Union[str, dict, list[Union[dict, str]], None] = None,
|
105
|
+
on: Union[list[str], str, None] = None,
|
105
106
|
name: Optional[str] = None,
|
106
107
|
) -> None:
|
107
108
|
if not isinstance(parcellation, list):
|
@@ -127,8 +128,8 @@ class ParcelAggregation(BaseMarker):
|
|
127
128
|
self.time_method_params = time_method_params or {}
|
128
129
|
|
129
130
|
def compute(
|
130
|
-
self, input:
|
131
|
-
) ->
|
131
|
+
self, input: dict[str, Any], extra_input: Optional[dict] = None
|
132
|
+
) -> dict:
|
132
133
|
"""Compute.
|
133
134
|
|
134
135
|
Parameters
|
@@ -168,8 +169,9 @@ class ParcelAggregation(BaseMarker):
|
|
168
169
|
)
|
169
170
|
|
170
171
|
# Get parcellation tailored to target image
|
171
|
-
parcellation_img, labels =
|
172
|
-
|
172
|
+
parcellation_img, labels = get_data(
|
173
|
+
kind="parcellation",
|
174
|
+
names=self.parcellation,
|
173
175
|
target_data=input,
|
174
176
|
extra_input=extra_input,
|
175
177
|
)
|
@@ -183,8 +185,11 @@ class ParcelAggregation(BaseMarker):
|
|
183
185
|
if self.masks is not None:
|
184
186
|
logger.debug(f"Masking with {self.masks}")
|
185
187
|
# Get tailored mask
|
186
|
-
mask_img =
|
187
|
-
|
188
|
+
mask_img = get_data(
|
189
|
+
kind="mask",
|
190
|
+
names=self.masks,
|
191
|
+
target_data=input,
|
192
|
+
extra_input=extra_input,
|
188
193
|
)
|
189
194
|
# Get "logical and" version of parcellation and mask
|
190
195
|
parcellation_bin = math_img(
|
junifer/markers/py.typed
ADDED
File without changes
|
junifer/markers/reho/__init__.py
CHANGED
@@ -3,8 +3,7 @@
|
|
3
3
|
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
|
4
4
|
# License: AGPL
|
5
5
|
|
6
|
-
|
7
|
-
from .reho_spheres import ReHoSpheres
|
6
|
+
import lazy_loader as lazy
|
8
7
|
|
9
8
|
|
10
|
-
__all__ =
|
9
|
+
__getattr__, __dir__, __all__ = lazy.attach_stub(__name__, __file__)
|
@@ -8,29 +8,25 @@ from pathlib import Path
|
|
8
8
|
from typing import (
|
9
9
|
TYPE_CHECKING,
|
10
10
|
ClassVar,
|
11
|
-
Dict,
|
12
|
-
List,
|
13
11
|
Optional,
|
14
|
-
Tuple,
|
15
|
-
Union,
|
16
12
|
)
|
17
13
|
|
18
14
|
import nibabel as nib
|
19
15
|
|
20
16
|
from ...pipeline import WorkDirManager
|
21
|
-
from ...
|
17
|
+
from ...typing import ExternalDependencies
|
22
18
|
from ...utils import logger, run_ext_cmd
|
19
|
+
from ...utils.singleton import Singleton
|
23
20
|
|
24
21
|
|
25
22
|
if TYPE_CHECKING:
|
26
|
-
from nibabel import Nifti1Image
|
23
|
+
from nibabel.nifti1 import Nifti1Image
|
27
24
|
|
28
25
|
|
29
26
|
__all__ = ["AFNIReHo"]
|
30
27
|
|
31
28
|
|
32
|
-
|
33
|
-
class AFNIReHo:
|
29
|
+
class AFNIReHo(metaclass=Singleton):
|
34
30
|
"""Class for computing ReHo using AFNI.
|
35
31
|
|
36
32
|
This class uses AFNI's 3dReHo to compute ReHo. It's designed as a singleton
|
@@ -38,7 +34,7 @@ class AFNIReHo:
|
|
38
34
|
|
39
35
|
"""
|
40
36
|
|
41
|
-
_EXT_DEPENDENCIES: ClassVar[
|
37
|
+
_EXT_DEPENDENCIES: ClassVar[ExternalDependencies] = [
|
42
38
|
{
|
43
39
|
"name": "afni",
|
44
40
|
"commands": ["3dReHo", "3dAFNItoNIFTI"],
|
@@ -54,7 +50,7 @@ class AFNIReHo:
|
|
54
50
|
@lru_cache(maxsize=None, typed=True)
|
55
51
|
def compute(
|
56
52
|
self,
|
57
|
-
|
53
|
+
input_path: Path,
|
58
54
|
nneigh: int = 27,
|
59
55
|
neigh_rad: Optional[float] = None,
|
60
56
|
neigh_x: Optional[float] = None,
|
@@ -64,13 +60,13 @@ class AFNIReHo:
|
|
64
60
|
box_x: Optional[int] = None,
|
65
61
|
box_y: Optional[int] = None,
|
66
62
|
box_z: Optional[int] = None,
|
67
|
-
) ->
|
63
|
+
) -> tuple["Nifti1Image", Path]:
|
68
64
|
"""Compute ReHo map.
|
69
65
|
|
70
66
|
Parameters
|
71
67
|
----------
|
72
|
-
|
73
|
-
|
68
|
+
input_path : pathlib.Path
|
69
|
+
Path to the input data.
|
74
70
|
nneigh : {7, 19, 27}, optional
|
75
71
|
Number of voxels in the neighbourhood, inclusive. Can be:
|
76
72
|
|
@@ -132,19 +128,17 @@ class AFNIReHo:
|
|
132
128
|
"""
|
133
129
|
logger.debug("Creating cache for ReHo computation via AFNI")
|
134
130
|
|
135
|
-
# Create
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
nifti_in_file_path = tempdir / "input.nii" # needs to be .nii
|
140
|
-
nib.save(data, nifti_in_file_path)
|
131
|
+
# Create element-scoped tempdir
|
132
|
+
element_tempdir = WorkDirManager().get_element_tempdir(
|
133
|
+
prefix="afni_reho"
|
134
|
+
)
|
141
135
|
|
142
136
|
# Set 3dReHo command
|
143
|
-
reho_out_path_prefix =
|
137
|
+
reho_out_path_prefix = element_tempdir / "output"
|
144
138
|
reho_cmd = [
|
145
139
|
"3dReHo",
|
146
140
|
f"-prefix {reho_out_path_prefix.resolve()}",
|
147
|
-
f"-inset {
|
141
|
+
f"-inset {input_path.resolve()}",
|
148
142
|
]
|
149
143
|
# Check ellipsoidal / cuboidal volume arguments
|
150
144
|
if neigh_rad:
|
@@ -168,28 +162,28 @@ class AFNIReHo:
|
|
168
162
|
# Call 3dReHo
|
169
163
|
run_ext_cmd(name="3dReHo", cmd=reho_cmd)
|
170
164
|
|
171
|
-
#
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
165
|
+
# Read header to get output suffix
|
166
|
+
niimg = nib.load(input_path)
|
167
|
+
header = niimg.header
|
168
|
+
sform_code = header.get_sform(coded=True)[1]
|
169
|
+
if sform_code == 4:
|
170
|
+
output_suffix = "tlrc"
|
171
|
+
else:
|
172
|
+
output_suffix = "orig"
|
173
|
+
|
177
174
|
# Convert afni to nifti
|
178
|
-
|
175
|
+
reho_nifti_out_path = (
|
179
176
|
element_tempdir / "output.nii" # needs to be .nii
|
180
177
|
)
|
181
178
|
convert_cmd = [
|
182
179
|
"3dAFNItoNIFTI",
|
183
|
-
f"-prefix {
|
184
|
-
f"{reho_out_path_prefix}+
|
180
|
+
f"-prefix {reho_nifti_out_path.resolve()}",
|
181
|
+
f"{reho_out_path_prefix}+{output_suffix}.BRIK",
|
185
182
|
]
|
186
183
|
# Call 3dAFNItoNIFTI
|
187
184
|
run_ext_cmd(name="3dAFNItoNIFTI", cmd=convert_cmd)
|
188
185
|
|
189
186
|
# Load nifti
|
190
|
-
output_data = nib.load(
|
191
|
-
|
192
|
-
# Delete tempdir
|
193
|
-
WorkDirManager().delete_tempdir(tempdir)
|
187
|
+
output_data = nib.load(reho_nifti_out_path)
|
194
188
|
|
195
|
-
return output_data,
|
189
|
+
return output_data, reho_nifti_out_path
|
@@ -9,8 +9,6 @@ from pathlib import Path
|
|
9
9
|
from typing import (
|
10
10
|
TYPE_CHECKING,
|
11
11
|
ClassVar,
|
12
|
-
Set,
|
13
|
-
Tuple,
|
14
12
|
)
|
15
13
|
|
16
14
|
import nibabel as nib
|
@@ -20,26 +18,26 @@ from nilearn import image as nimg
|
|
20
18
|
from nilearn import masking as nmask
|
21
19
|
|
22
20
|
from ...pipeline import WorkDirManager
|
23
|
-
from ...
|
21
|
+
from ...typing import Dependencies
|
24
22
|
from ...utils import logger, raise_error
|
23
|
+
from ...utils.singleton import Singleton
|
25
24
|
|
26
25
|
|
27
26
|
if TYPE_CHECKING:
|
28
|
-
from nibabel import Nifti1Image
|
27
|
+
from nibabel.nifti1 import Nifti1Image
|
29
28
|
|
30
29
|
|
31
30
|
__all__ = ["JuniferReHo"]
|
32
31
|
|
33
32
|
|
34
|
-
|
35
|
-
class JuniferReHo:
|
33
|
+
class JuniferReHo(metaclass=Singleton):
|
36
34
|
"""Class for computing ReHo using junifer.
|
37
35
|
|
38
36
|
It's designed as a singleton with caching for efficient computation.
|
39
37
|
|
40
38
|
"""
|
41
39
|
|
42
|
-
_DEPENDENCIES: ClassVar[
|
40
|
+
_DEPENDENCIES: ClassVar[Dependencies] = {"numpy", "nilearn", "scipy"}
|
43
41
|
|
44
42
|
def __del__(self) -> None:
|
45
43
|
"""Terminate the class."""
|
@@ -50,15 +48,15 @@ class JuniferReHo:
|
|
50
48
|
@lru_cache(maxsize=None, typed=True)
|
51
49
|
def compute(
|
52
50
|
self,
|
53
|
-
|
51
|
+
input_path: Path,
|
54
52
|
nneigh: int = 27,
|
55
|
-
) ->
|
53
|
+
) -> tuple["Nifti1Image", Path]:
|
56
54
|
"""Compute ReHo map.
|
57
55
|
|
58
56
|
Parameters
|
59
57
|
----------
|
60
|
-
|
61
|
-
|
58
|
+
input_path : pathlib.Path
|
59
|
+
Path to the input data.
|
62
60
|
nneigh : {7, 19, 27, 125}, optional
|
63
61
|
Number of voxels in the neighbourhood, inclusive. Can be:
|
64
62
|
|
@@ -91,7 +89,8 @@ class JuniferReHo:
|
|
91
89
|
logger.debug("Creating cache for ReHo computation via junifer")
|
92
90
|
|
93
91
|
# Get scan data
|
94
|
-
|
92
|
+
niimg = nib.load(input_path)
|
93
|
+
niimg_data = niimg.get_fdata().copy()
|
95
94
|
# Get scan dimensions
|
96
95
|
n_x, n_y, n_z, _ = niimg_data.shape
|
97
96
|
|
@@ -121,7 +120,7 @@ class JuniferReHo:
|
|
121
120
|
# after #299 is merged
|
122
121
|
# Calculate whole brain mask
|
123
122
|
mni152_whole_brain_mask = nmask.compute_brain_mask(
|
124
|
-
target_img=
|
123
|
+
target_img=niimg,
|
125
124
|
threshold=0.5,
|
126
125
|
mask_type="whole-brain",
|
127
126
|
)
|
@@ -229,7 +228,7 @@ class JuniferReHo:
|
|
229
228
|
|
230
229
|
# Create new image like target image
|
231
230
|
output_data = nimg.new_img_like(
|
232
|
-
ref_niimg=
|
231
|
+
ref_niimg=niimg,
|
233
232
|
data=reho_map,
|
234
233
|
copy_header=False,
|
235
234
|
)
|
File without changes
|
@@ -9,14 +9,10 @@ from typing import (
|
|
9
9
|
TYPE_CHECKING,
|
10
10
|
Any,
|
11
11
|
ClassVar,
|
12
|
-
Dict,
|
13
|
-
List,
|
14
12
|
Optional,
|
15
|
-
Tuple,
|
16
|
-
Type,
|
17
|
-
Union,
|
18
13
|
)
|
19
14
|
|
15
|
+
from ...typing import ConditionalDependencies, MarkerInOutMappings
|
20
16
|
from ...utils import logger, raise_error
|
21
17
|
from ..base import BaseMarker
|
22
18
|
from ._afni_reho import AFNIReHo
|
@@ -24,7 +20,7 @@ from ._junifer_reho import JuniferReHo
|
|
24
20
|
|
25
21
|
|
26
22
|
if TYPE_CHECKING:
|
27
|
-
from nibabel import Nifti1Image
|
23
|
+
from nibabel.nifti1 import Nifti1Image
|
28
24
|
|
29
25
|
__all__ = ["ReHoBase"]
|
30
26
|
|
@@ -51,7 +47,7 @@ class ReHoBase(BaseMarker):
|
|
51
47
|
|
52
48
|
"""
|
53
49
|
|
54
|
-
_CONDITIONAL_DEPENDENCIES: ClassVar[
|
50
|
+
_CONDITIONAL_DEPENDENCIES: ClassVar[ConditionalDependencies] = [
|
55
51
|
{
|
56
52
|
"using": "afni",
|
57
53
|
"depends_on": AFNIReHo,
|
@@ -62,7 +58,7 @@ class ReHoBase(BaseMarker):
|
|
62
58
|
},
|
63
59
|
]
|
64
60
|
|
65
|
-
_MARKER_INOUT_MAPPINGS: ClassVar[
|
61
|
+
_MARKER_INOUT_MAPPINGS: ClassVar[MarkerInOutMappings] = {
|
66
62
|
"BOLD": {
|
67
63
|
"reho": "vector",
|
68
64
|
},
|
@@ -84,9 +80,9 @@ class ReHoBase(BaseMarker):
|
|
84
80
|
|
85
81
|
def _compute(
|
86
82
|
self,
|
87
|
-
input_data:
|
83
|
+
input_data: dict[str, Any],
|
88
84
|
**reho_params: Any,
|
89
|
-
) ->
|
85
|
+
) -> tuple["Nifti1Image", Path]:
|
90
86
|
"""Compute voxel-wise ReHo.
|
91
87
|
|
92
88
|
Calculates Kendall's W per voxel using neighborhood voxels.
|
@@ -129,7 +125,7 @@ class ReHoBase(BaseMarker):
|
|
129
125
|
estimator = JuniferReHo()
|
130
126
|
# Compute reho
|
131
127
|
reho_map, reho_map_path = estimator.compute( # type: ignore
|
132
|
-
|
128
|
+
input_path=input_data["path"],
|
133
129
|
**reho_params,
|
134
130
|
)
|
135
131
|
|