junifer 0.0.6.dev219__py3-none-any.whl → 0.0.6.dev248__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__.pyi +2 -0
- junifer/_version.py +2 -2
- junifer/api/decorators.py +5 -4
- junifer/api/functions.py +9 -8
- junifer/data/coordinates/_ants_coordinates_warper.py +4 -6
- junifer/data/coordinates/_coordinates.py +28 -15
- junifer/data/coordinates/_fsl_coordinates_warper.py +4 -6
- junifer/data/masks/_ants_mask_warper.py +16 -9
- junifer/data/masks/_fsl_mask_warper.py +4 -6
- junifer/data/masks/_masks.py +21 -25
- junifer/data/parcellations/_ants_parcellation_warper.py +16 -9
- junifer/data/parcellations/_fsl_parcellation_warper.py +4 -6
- junifer/data/parcellations/_parcellations.py +20 -24
- junifer/data/utils.py +67 -3
- junifer/datagrabber/aomic/id1000.py +22 -9
- junifer/datagrabber/aomic/piop1.py +22 -9
- junifer/datagrabber/aomic/piop2.py +22 -9
- junifer/datagrabber/base.py +6 -1
- junifer/datagrabber/datalad_base.py +15 -8
- junifer/datagrabber/dmcc13_benchmark.py +23 -10
- junifer/datagrabber/hcp1200/hcp1200.py +18 -7
- junifer/datagrabber/multiple.py +2 -1
- junifer/datagrabber/pattern.py +65 -35
- junifer/datagrabber/pattern_validation_mixin.py +197 -87
- junifer/datagrabber/tests/test_dmcc13_benchmark.py +26 -9
- junifer/markers/base.py +4 -7
- junifer/markers/brainprint.py +4 -4
- junifer/markers/complexity/complexity_base.py +3 -3
- junifer/markers/ets_rss.py +4 -3
- junifer/markers/falff/_afni_falff.py +3 -5
- junifer/markers/falff/_junifer_falff.py +3 -3
- junifer/markers/falff/falff_base.py +4 -6
- junifer/markers/functional_connectivity/crossparcellation_functional_connectivity.py +4 -3
- junifer/markers/functional_connectivity/functional_connectivity_base.py +4 -3
- junifer/markers/parcel_aggregation.py +4 -3
- junifer/markers/reho/_afni_reho.py +3 -5
- junifer/markers/reho/_junifer_reho.py +3 -3
- junifer/markers/reho/reho_base.py +4 -6
- junifer/markers/sphere_aggregation.py +4 -3
- junifer/markers/temporal_snr/temporal_snr_base.py +4 -3
- junifer/onthefly/_brainprint.py +4 -7
- junifer/onthefly/read_transform.py +3 -6
- junifer/pipeline/marker_collection.py +6 -12
- junifer/pipeline/pipeline_component_registry.py +3 -8
- junifer/pipeline/pipeline_step_mixin.py +8 -4
- junifer/pipeline/tests/test_pipeline_step_mixin.py +18 -19
- junifer/pipeline/tests/test_workdir_manager.py +1 -0
- junifer/pipeline/update_meta_mixin.py +21 -17
- junifer/preprocess/confounds/fmriprep_confound_remover.py +2 -2
- junifer/preprocess/smoothing/_afni_smoothing.py +4 -6
- junifer/preprocess/smoothing/_fsl_smoothing.py +4 -7
- junifer/preprocess/smoothing/_nilearn_smoothing.py +3 -3
- junifer/preprocess/smoothing/smoothing.py +3 -2
- junifer/preprocess/warping/_ants_warper.py +26 -7
- junifer/preprocess/warping/_fsl_warper.py +22 -8
- junifer/preprocess/warping/space_warper.py +34 -6
- junifer/preprocess/warping/tests/test_space_warper.py +4 -7
- junifer/typing/__init__.py +9 -0
- junifer/typing/__init__.pyi +23 -0
- junifer/typing/_typing.py +61 -0
- {junifer-0.0.6.dev219.dist-info → junifer-0.0.6.dev248.dist-info}/METADATA +2 -1
- {junifer-0.0.6.dev219.dist-info → junifer-0.0.6.dev248.dist-info}/RECORD +67 -64
- {junifer-0.0.6.dev219.dist-info → junifer-0.0.6.dev248.dist-info}/WHEEL +1 -1
- {junifer-0.0.6.dev219.dist-info → junifer-0.0.6.dev248.dist-info}/AUTHORS.rst +0 -0
- {junifer-0.0.6.dev219.dist-info → junifer-0.0.6.dev248.dist-info}/LICENSE.md +0 -0
- {junifer-0.0.6.dev219.dist-info → junifer-0.0.6.dev248.dist-info}/entry_points.txt +0 -0
- {junifer-0.0.6.dev219.dist-info → junifer-0.0.6.dev248.dist-info}/top_level.txt +0 -0
@@ -6,20 +6,17 @@
|
|
6
6
|
from typing import (
|
7
7
|
TYPE_CHECKING,
|
8
8
|
ClassVar,
|
9
|
-
Dict,
|
10
|
-
List,
|
11
|
-
Set,
|
12
|
-
Union,
|
13
9
|
)
|
14
10
|
|
15
11
|
import nibabel as nib
|
16
12
|
|
17
13
|
from ...pipeline import WorkDirManager
|
14
|
+
from ...typing import Dependencies, ExternalDependencies
|
18
15
|
from ...utils import logger, run_ext_cmd
|
19
16
|
|
20
17
|
|
21
18
|
if TYPE_CHECKING:
|
22
|
-
from nibabel import Nifti1Image
|
19
|
+
from nibabel.nifti1 import Nifti1Image
|
23
20
|
|
24
21
|
|
25
22
|
__all__ = ["FSLSmoothing"]
|
@@ -32,14 +29,14 @@ class FSLSmoothing:
|
|
32
29
|
|
33
30
|
"""
|
34
31
|
|
35
|
-
_EXT_DEPENDENCIES: ClassVar[
|
32
|
+
_EXT_DEPENDENCIES: ClassVar[ExternalDependencies] = [
|
36
33
|
{
|
37
34
|
"name": "fsl",
|
38
35
|
"commands": ["susan"],
|
39
36
|
},
|
40
37
|
]
|
41
38
|
|
42
|
-
_DEPENDENCIES: ClassVar[
|
39
|
+
_DEPENDENCIES: ClassVar[Dependencies] = {"nibabel"}
|
43
40
|
|
44
41
|
def preprocess(
|
45
42
|
self,
|
@@ -7,18 +7,18 @@ from typing import (
|
|
7
7
|
TYPE_CHECKING,
|
8
8
|
ClassVar,
|
9
9
|
Literal,
|
10
|
-
Set,
|
11
10
|
Union,
|
12
11
|
)
|
13
12
|
|
14
13
|
from nilearn import image as nimg
|
15
14
|
from numpy.typing import ArrayLike
|
16
15
|
|
16
|
+
from ...typing import Dependencies
|
17
17
|
from ...utils import logger
|
18
18
|
|
19
19
|
|
20
20
|
if TYPE_CHECKING:
|
21
|
-
from nibabel import Nifti1Image
|
21
|
+
from nibabel.nifti1 import Nifti1Image
|
22
22
|
|
23
23
|
|
24
24
|
__all__ = ["NilearnSmoothing"]
|
@@ -31,7 +31,7 @@ class NilearnSmoothing:
|
|
31
31
|
|
32
32
|
"""
|
33
33
|
|
34
|
-
_DEPENDENCIES: ClassVar[
|
34
|
+
_DEPENDENCIES: ClassVar[Dependencies] = {"nilearn"}
|
35
35
|
|
36
36
|
def preprocess(
|
37
37
|
self,
|
@@ -3,9 +3,10 @@
|
|
3
3
|
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
|
4
4
|
# License: AGPL
|
5
5
|
|
6
|
-
from typing import Any, ClassVar, Dict, List, Optional, Tuple,
|
6
|
+
from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union
|
7
7
|
|
8
8
|
from ...api.decorators import register_preprocessor
|
9
|
+
from ...typing import ConditionalDependencies
|
9
10
|
from ...utils import logger, raise_error
|
10
11
|
from ..base import BasePreprocessor
|
11
12
|
from ._afni_smoothing import AFNISmoothing
|
@@ -67,7 +68,7 @@ class Smoothing(BasePreprocessor):
|
|
67
68
|
|
68
69
|
"""
|
69
70
|
|
70
|
-
_CONDITIONAL_DEPENDENCIES: ClassVar[
|
71
|
+
_CONDITIONAL_DEPENDENCIES: ClassVar[ConditionalDependencies] = [
|
71
72
|
{
|
72
73
|
"using": "nilearn",
|
73
74
|
"depends_on": NilearnSmoothing,
|
@@ -7,9 +7,6 @@ from typing import (
|
|
7
7
|
Any,
|
8
8
|
ClassVar,
|
9
9
|
Dict,
|
10
|
-
List,
|
11
|
-
Set,
|
12
|
-
Union,
|
13
10
|
)
|
14
11
|
|
15
12
|
import nibabel as nib
|
@@ -17,7 +14,8 @@ import numpy as np
|
|
17
14
|
|
18
15
|
from ...data import get_template, get_xfm
|
19
16
|
from ...pipeline import WorkDirManager
|
20
|
-
from ...
|
17
|
+
from ...typing import Dependencies, ExternalDependencies
|
18
|
+
from ...utils import logger, raise_error, run_ext_cmd
|
21
19
|
|
22
20
|
|
23
21
|
__all__ = ["ANTsWarper"]
|
@@ -31,14 +29,14 @@ class ANTsWarper:
|
|
31
29
|
|
32
30
|
"""
|
33
31
|
|
34
|
-
_EXT_DEPENDENCIES: ClassVar[
|
32
|
+
_EXT_DEPENDENCIES: ClassVar[ExternalDependencies] = [
|
35
33
|
{
|
36
34
|
"name": "ants",
|
37
35
|
"commands": ["ResampleImage", "antsApplyTransforms"],
|
38
36
|
},
|
39
37
|
]
|
40
38
|
|
41
|
-
_DEPENDENCIES: ClassVar[
|
39
|
+
_DEPENDENCIES: ClassVar[Dependencies] = {"numpy", "nibabel"}
|
42
40
|
|
43
41
|
def preprocess(
|
44
42
|
self,
|
@@ -65,6 +63,11 @@ class ANTsWarper:
|
|
65
63
|
values and new ``reference_path`` key whose value points to the
|
66
64
|
reference file used for warping.
|
67
65
|
|
66
|
+
Raises
|
67
|
+
------
|
68
|
+
RuntimeError
|
69
|
+
If warp file path could not be found in ``extra_input``.
|
70
|
+
|
68
71
|
"""
|
69
72
|
# Create element-specific tempdir for storing post-warping assets
|
70
73
|
element_tempdir = WorkDirManager().get_element_tempdir(
|
@@ -79,6 +82,17 @@ class ANTsWarper:
|
|
79
82
|
# resolution
|
80
83
|
resolution = np.min(input["data"].header.get_zooms()[:3])
|
81
84
|
|
85
|
+
# Get warp file path
|
86
|
+
warp_file_path = None
|
87
|
+
for entry in extra_input["Warp"]:
|
88
|
+
if entry["dst"] == "native":
|
89
|
+
warp_file_path = entry["path"]
|
90
|
+
if warp_file_path is None:
|
91
|
+
raise_error(
|
92
|
+
klass=RuntimeError,
|
93
|
+
msg="Could not find correct warp file path",
|
94
|
+
)
|
95
|
+
|
82
96
|
# Create a tempfile for resampled reference output
|
83
97
|
resample_image_out_path = (
|
84
98
|
element_tempdir / "resampled_reference.nii.gz"
|
@@ -107,7 +121,7 @@ class ANTsWarper:
|
|
107
121
|
f"-i {input['path'].resolve()}",
|
108
122
|
# use resampled reference
|
109
123
|
f"-r {resample_image_out_path.resolve()}",
|
110
|
-
f"-t {
|
124
|
+
f"-t {warp_file_path.resolve()}",
|
111
125
|
f"-o {apply_transforms_out_path.resolve()}",
|
112
126
|
]
|
113
127
|
# Call antsApplyTransforms
|
@@ -117,6 +131,8 @@ class ANTsWarper:
|
|
117
131
|
input["data"] = nib.load(apply_transforms_out_path)
|
118
132
|
# Save resampled reference path
|
119
133
|
input["reference_path"] = resample_image_out_path
|
134
|
+
# Keep pre-warp space for further operations
|
135
|
+
input["prewarp_space"] = input["space"]
|
120
136
|
# Use reference input's space as warped input's space
|
121
137
|
input["space"] = extra_input["T1w"]["space"]
|
122
138
|
|
@@ -165,6 +181,9 @@ class ANTsWarper:
|
|
165
181
|
|
166
182
|
# Modify target data
|
167
183
|
input["data"] = nib.load(warped_output_path)
|
184
|
+
# Keep pre-warp space for further operations
|
185
|
+
input["prewarp_space"] = input["space"]
|
186
|
+
# Update warped input's space
|
168
187
|
input["space"] = reference
|
169
188
|
|
170
189
|
return input
|
@@ -7,16 +7,14 @@ from typing import (
|
|
7
7
|
Any,
|
8
8
|
ClassVar,
|
9
9
|
Dict,
|
10
|
-
List,
|
11
|
-
Set,
|
12
|
-
Union,
|
13
10
|
)
|
14
11
|
|
15
12
|
import nibabel as nib
|
16
13
|
import numpy as np
|
17
14
|
|
18
15
|
from ...pipeline import WorkDirManager
|
19
|
-
from ...
|
16
|
+
from ...typing import Dependencies, ExternalDependencies
|
17
|
+
from ...utils import logger, raise_error, run_ext_cmd
|
20
18
|
|
21
19
|
|
22
20
|
__all__ = ["FSLWarper"]
|
@@ -30,14 +28,14 @@ class FSLWarper:
|
|
30
28
|
|
31
29
|
"""
|
32
30
|
|
33
|
-
_EXT_DEPENDENCIES: ClassVar[
|
31
|
+
_EXT_DEPENDENCIES: ClassVar[ExternalDependencies] = [
|
34
32
|
{
|
35
33
|
"name": "fsl",
|
36
34
|
"commands": ["flirt", "applywarp"],
|
37
35
|
},
|
38
36
|
]
|
39
37
|
|
40
|
-
_DEPENDENCIES: ClassVar[
|
38
|
+
_DEPENDENCIES: ClassVar[Dependencies] = {"numpy", "nibabel"}
|
41
39
|
|
42
40
|
def preprocess(
|
43
41
|
self,
|
@@ -61,6 +59,11 @@ class FSLWarper:
|
|
61
59
|
values and new ``reference_path`` key whose value points to the
|
62
60
|
reference file used for warping.
|
63
61
|
|
62
|
+
Raises
|
63
|
+
------
|
64
|
+
RuntimeError
|
65
|
+
If warp file path could not be found in ``extra_input``.
|
66
|
+
|
64
67
|
"""
|
65
68
|
logger.debug("Using FSL for space warping")
|
66
69
|
|
@@ -68,6 +71,16 @@ class FSLWarper:
|
|
68
71
|
# resolution
|
69
72
|
resolution = np.min(input["data"].header.get_zooms()[:3])
|
70
73
|
|
74
|
+
# Get warp file path
|
75
|
+
warp_file_path = None
|
76
|
+
for entry in extra_input["Warp"]:
|
77
|
+
if entry["dst"] == "native":
|
78
|
+
warp_file_path = entry["path"]
|
79
|
+
if warp_file_path is None:
|
80
|
+
raise_error(
|
81
|
+
klass=RuntimeError, msg="Could not find correct warp file path"
|
82
|
+
)
|
83
|
+
|
71
84
|
# Create element-specific tempdir for storing post-warping assets
|
72
85
|
element_tempdir = WorkDirManager().get_element_tempdir(
|
73
86
|
prefix="fsl_warper"
|
@@ -95,7 +108,7 @@ class FSLWarper:
|
|
95
108
|
"--interp=spline",
|
96
109
|
f"-i {input['path'].resolve()}",
|
97
110
|
f"-r {flirt_out_path.resolve()}", # use resampled reference
|
98
|
-
f"-w {
|
111
|
+
f"-w {warp_file_path.resolve()}",
|
99
112
|
f"-o {applywarp_out_path.resolve()}",
|
100
113
|
]
|
101
114
|
# Call applywarp
|
@@ -105,7 +118,8 @@ class FSLWarper:
|
|
105
118
|
input["data"] = nib.load(applywarp_out_path)
|
106
119
|
# Save resampled reference path
|
107
120
|
input["reference_path"] = flirt_out_path
|
108
|
-
|
121
|
+
# Keep pre-warp space for further operations
|
122
|
+
input["prewarp_space"] = input["space"]
|
109
123
|
# Use reference input's space as warped input's space
|
110
124
|
input["space"] = extra_input["T1w"]["space"]
|
111
125
|
|
@@ -3,11 +3,12 @@
|
|
3
3
|
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
|
4
4
|
# License: AGPL
|
5
5
|
|
6
|
-
from typing import Any, ClassVar, Dict, List, Optional, Tuple,
|
6
|
+
from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union
|
7
7
|
|
8
8
|
from templateflow import api as tflow
|
9
9
|
|
10
10
|
from ...api.decorators import register_preprocessor
|
11
|
+
from ...typing import ConditionalDependencies
|
11
12
|
from ...utils import logger, raise_error
|
12
13
|
from ..base import BasePreprocessor
|
13
14
|
from ._ants_warper import ANTsWarper
|
@@ -23,11 +24,12 @@ class SpaceWarper(BasePreprocessor):
|
|
23
24
|
|
24
25
|
Parameters
|
25
26
|
----------
|
26
|
-
using : {"fsl", "ants"}
|
27
|
+
using : {"fsl", "ants", "auto"}
|
27
28
|
Implementation to use for warping:
|
28
29
|
|
29
30
|
* "fsl" : Use FSL's ``applywarp``
|
30
31
|
* "ants" : Use ANTs' ``antsApplyTransforms``
|
32
|
+
* "auto" : Auto-select tool when ``reference="T1w"``
|
31
33
|
|
32
34
|
reference : str
|
33
35
|
The data type to use as reference for warping, can be either a data
|
@@ -46,7 +48,7 @@ class SpaceWarper(BasePreprocessor):
|
|
46
48
|
|
47
49
|
"""
|
48
50
|
|
49
|
-
_CONDITIONAL_DEPENDENCIES: ClassVar[
|
51
|
+
_CONDITIONAL_DEPENDENCIES: ClassVar[ConditionalDependencies] = [
|
50
52
|
{
|
51
53
|
"using": "fsl",
|
52
54
|
"depends_on": FSLWarper,
|
@@ -55,6 +57,10 @@ class SpaceWarper(BasePreprocessor):
|
|
55
57
|
"using": "ants",
|
56
58
|
"depends_on": ANTsWarper,
|
57
59
|
},
|
60
|
+
{
|
61
|
+
"using": "auto",
|
62
|
+
"depends_on": [FSLWarper, ANTsWarper],
|
63
|
+
},
|
58
64
|
]
|
59
65
|
|
60
66
|
def __init__(
|
@@ -155,14 +161,16 @@ class SpaceWarper(BasePreprocessor):
|
|
155
161
|
If ``extra_input`` is None when transforming to native space
|
156
162
|
i.e., using ``"T1w"`` as reference.
|
157
163
|
RuntimeError
|
158
|
-
If
|
164
|
+
If warper could not be found in ``extra_input`` when
|
165
|
+
``using="auto"`` or
|
166
|
+
if the data is in the correct space and does not require
|
159
167
|
warping or
|
160
|
-
if FSL is used
|
168
|
+
if FSL is used when ``reference="T1w"``.
|
161
169
|
|
162
170
|
"""
|
163
171
|
logger.info(f"Warping to {self.reference} space using SpaceWarper")
|
164
172
|
# Transform to native space
|
165
|
-
if self.using in ["fsl", "ants"] and self.reference == "T1w":
|
173
|
+
if self.using in ["fsl", "ants", "auto"] and self.reference == "T1w":
|
166
174
|
# Check for extra inputs
|
167
175
|
if extra_input is None:
|
168
176
|
raise_error(
|
@@ -181,6 +189,26 @@ class SpaceWarper(BasePreprocessor):
|
|
181
189
|
extra_input=extra_input,
|
182
190
|
reference=self.reference,
|
183
191
|
)
|
192
|
+
elif self.using == "auto":
|
193
|
+
warper = None
|
194
|
+
for entry in extra_input["Warp"]:
|
195
|
+
if entry["dst"] == "native":
|
196
|
+
warper = entry["warper"]
|
197
|
+
if warper is None:
|
198
|
+
raise_error(
|
199
|
+
klass=RuntimeError, msg="Could not find correct warper"
|
200
|
+
)
|
201
|
+
if warper == "fsl":
|
202
|
+
input = FSLWarper().preprocess(
|
203
|
+
input=input,
|
204
|
+
extra_input=extra_input,
|
205
|
+
)
|
206
|
+
elif warper == "ants":
|
207
|
+
input = ANTsWarper().preprocess(
|
208
|
+
input=input,
|
209
|
+
extra_input=extra_input,
|
210
|
+
reference=self.reference,
|
211
|
+
)
|
184
212
|
# Transform to template space with ANTs possible
|
185
213
|
elif self.using == "ants" and self.reference != "T1w":
|
186
214
|
# Check pre-requirements for space manipulation
|
@@ -4,7 +4,7 @@
|
|
4
4
|
# License: AGPL
|
5
5
|
|
6
6
|
import socket
|
7
|
-
from typing import
|
7
|
+
from typing import Tuple, Type
|
8
8
|
|
9
9
|
import pytest
|
10
10
|
from numpy.testing import assert_array_equal, assert_raises
|
@@ -14,10 +14,7 @@ from junifer.datareader import DefaultDataReader
|
|
14
14
|
from junifer.pipeline.utils import _check_ants, _check_fsl
|
15
15
|
from junifer.preprocess import SpaceWarper
|
16
16
|
from junifer.testing.datagrabbers import PartlyCloudyTestingDataGrabber
|
17
|
-
|
18
|
-
|
19
|
-
if TYPE_CHECKING:
|
20
|
-
from junifer.datagrabber import BaseDataGrabber
|
17
|
+
from junifer.typing import DataGrabberLike
|
21
18
|
|
22
19
|
|
23
20
|
@pytest.mark.parametrize(
|
@@ -99,7 +96,7 @@ def test_SpaceWarper_errors(
|
|
99
96
|
reason="only for juseless",
|
100
97
|
)
|
101
98
|
def test_SpaceWarper_native(
|
102
|
-
datagrabber:
|
99
|
+
datagrabber: DataGrabberLike, element: Tuple[str, ...], using: str
|
103
100
|
) -> None:
|
104
101
|
"""Test SpaceWarper for native space warping.
|
105
102
|
|
@@ -162,7 +159,7 @@ def test_SpaceWarper_native(
|
|
162
159
|
_check_ants() is False, reason="requires ANTs to be in PATH"
|
163
160
|
)
|
164
161
|
def test_SpaceWarper_multi_mni(
|
165
|
-
datagrabber:
|
162
|
+
datagrabber: DataGrabberLike,
|
166
163
|
element: Tuple[str, ...],
|
167
164
|
space: str,
|
168
165
|
) -> None:
|
@@ -0,0 +1,23 @@
|
|
1
|
+
__all__ = [
|
2
|
+
"DataGrabberLike",
|
3
|
+
"PreprocessorLike",
|
4
|
+
"MarkerLike",
|
5
|
+
"StorageLike",
|
6
|
+
"PipelineComponent",
|
7
|
+
"Dependencies",
|
8
|
+
"ConditionalDependencies",
|
9
|
+
"ExternalDependencies",
|
10
|
+
"MarkerInOutMappings",
|
11
|
+
]
|
12
|
+
|
13
|
+
from ._typing import (
|
14
|
+
DataGrabberLike,
|
15
|
+
PreprocessorLike,
|
16
|
+
MarkerLike,
|
17
|
+
StorageLike,
|
18
|
+
PipelineComponent,
|
19
|
+
Dependencies,
|
20
|
+
ConditionalDependencies,
|
21
|
+
ExternalDependencies,
|
22
|
+
MarkerInOutMappings,
|
23
|
+
)
|
@@ -0,0 +1,61 @@
|
|
1
|
+
"""Provide type hints for internal and external use."""
|
2
|
+
|
3
|
+
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
|
4
|
+
# License: AGPL
|
5
|
+
|
6
|
+
from typing import (
|
7
|
+
TYPE_CHECKING,
|
8
|
+
AbstractSet,
|
9
|
+
MutableMapping,
|
10
|
+
Sequence,
|
11
|
+
Type,
|
12
|
+
Union,
|
13
|
+
)
|
14
|
+
|
15
|
+
|
16
|
+
if TYPE_CHECKING:
|
17
|
+
from ..datagrabber import BaseDataGrabber
|
18
|
+
from ..datareader import DefaultDataReader
|
19
|
+
from ..markers import BaseMarker
|
20
|
+
from ..preprocess import BasePreprocessor
|
21
|
+
from ..storage import BaseFeatureStorage
|
22
|
+
|
23
|
+
|
24
|
+
__all__ = [
|
25
|
+
"DataGrabberLike",
|
26
|
+
"PreprocessorLike",
|
27
|
+
"MarkerLike",
|
28
|
+
"StorageLike",
|
29
|
+
"PipelineComponent",
|
30
|
+
"Dependencies",
|
31
|
+
"ConditionalDependencies",
|
32
|
+
"ExternalDependencies",
|
33
|
+
"MarkerInOutMappings",
|
34
|
+
]
|
35
|
+
|
36
|
+
|
37
|
+
DataGrabberLike = Type["BaseDataGrabber"]
|
38
|
+
PreprocessorLike = Type["BasePreprocessor"]
|
39
|
+
MarkerLike = Type["BaseMarker"]
|
40
|
+
StorageLike = Type["BaseFeatureStorage"]
|
41
|
+
PipelineComponent = Union[
|
42
|
+
"DataGrabberLike",
|
43
|
+
"DefaultDataReader",
|
44
|
+
"PreprocessorLike",
|
45
|
+
"MarkerLike",
|
46
|
+
"StorageLike",
|
47
|
+
]
|
48
|
+
Dependencies = AbstractSet[str]
|
49
|
+
ConditionalDependencies = Sequence[
|
50
|
+
MutableMapping[
|
51
|
+
str,
|
52
|
+
Union[
|
53
|
+
str,
|
54
|
+
PipelineComponent,
|
55
|
+
Sequence[str],
|
56
|
+
Sequence[PipelineComponent],
|
57
|
+
],
|
58
|
+
]
|
59
|
+
]
|
60
|
+
ExternalDependencies = Sequence[MutableMapping[str, Union[str, Sequence[str]]]]
|
61
|
+
MarkerInOutMappings = MutableMapping[str, MutableMapping[str, str]]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: junifer
|
3
|
-
Version: 0.0.6.
|
3
|
+
Version: 0.0.6.dev248
|
4
4
|
Summary: JUelich NeuroImaging FEature extractoR
|
5
5
|
Author-email: Fede Raimondo <f.raimondo@fz-juelich.de>, Synchon Mandal <s.mandal@fz-juelich.de>
|
6
6
|
Maintainer-email: Fede Raimondo <f.raimondo@fz-juelich.de>, Synchon Mandal <s.mandal@fz-juelich.de>
|
@@ -111,6 +111,7 @@ The documentation is available at [https://juaml.github.io/junifer](https://juam
|
|
111
111
|
* `preprocess`: Preprocessing module.
|
112
112
|
* `storage`: Storage module.
|
113
113
|
* `testing`: Testing components module.
|
114
|
+
* `typing`: Type hints module.
|
114
115
|
* `utils`: Utilities module (e.g. logging).
|
115
116
|
|
116
117
|
## Installation
|