junifer 0.0.6.dev299__py3-none-any.whl → 0.0.6.dev302__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/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.0.6.dev299'
16
- __version_tuple__ = version_tuple = (0, 0, 6, 'dev299')
15
+ __version__ = version = '0.0.6.dev302'
16
+ __version_tuple__ = version_tuple = (0, 0, 6, 'dev302')
@@ -69,7 +69,7 @@ class FSLCoordinatesWarper:
69
69
  f"{pretransform_coordinates_path.resolve()}",
70
70
  "| img2imgcoord -mm",
71
71
  f"-src {target_data['path'].resolve()}",
72
- f"-dest {target_data['reference_path'].resolve()}",
72
+ f"-dest {target_data['reference']['path'].resolve()}",
73
73
  f"-warp {warp_data['path'].resolve()}",
74
74
  f"> {transformed_coords_path.resolve()};",
75
75
  f"sed -i 1d {transformed_coords_path.resolve()}",
@@ -49,9 +49,10 @@ class ANTsMaskWarper:
49
49
  It should be empty string if ``dst="T1w"``.
50
50
  dst : str
51
51
  The data type or template space to warp to.
52
- `"T1w"` is the only allowed data type and it uses the resampled T1w
53
- found in ``target_data.reference_path``. The ``"reference_path"``
54
- key is added when :class:`.SpaceWarper` is used.
52
+ `"native"` is the only allowed data type and it uses the resampled
53
+ T1w found in ``target_data.reference``. The
54
+ ``"reference"`` key is added when :class:`.SpaceWarper` is
55
+ used or if the data is provided native space.
55
56
  target_data : dict
56
57
  The corresponding item of the data object to which the mask
57
58
  will be applied.
@@ -87,6 +88,10 @@ class ANTsMaskWarper:
87
88
  # Warp data check
88
89
  if warp_data is None:
89
90
  raise_error("No `warp_data` provided")
91
+ if "reference" not in target_data:
92
+ raise_error("No `reference` provided")
93
+ if "path" not in target_data["reference"]:
94
+ raise_error("No `path` provided in `reference`")
90
95
 
91
96
  logger.debug("Using ANTs for mask transformation")
92
97
 
@@ -104,7 +109,7 @@ class ANTsMaskWarper:
104
109
  "-n 'GenericLabel[NearestNeighbor]'",
105
110
  f"-i {prewarp_mask_path.resolve()}",
106
111
  # use resampled reference
107
- f"-r {target_data['reference_path'].resolve()}",
112
+ f"-r {target_data['reference']['path'].resolve()}",
108
113
  f"-t {warp_data['path'].resolve()}",
109
114
  f"-o {warped_mask_path.resolve()}",
110
115
  ]
@@ -74,7 +74,7 @@ class FSLMaskWarper:
74
74
  "--interp=nn",
75
75
  f"-i {prewarp_mask_path.resolve()}",
76
76
  # use resampled reference
77
- f"-r {target_data['reference_path'].resolve()}",
77
+ f"-r {target_data['reference']['path'].resolve()}",
78
78
  f"-w {warp_data['path'].resolve()}",
79
79
  f"-o {warped_mask_path.resolve()}",
80
80
  ]
@@ -50,8 +50,9 @@ class ANTsParcellationWarper:
50
50
  dst : str
51
51
  The data type or template space to warp to.
52
52
  `"T1w"` is the only allowed data type and it uses the resampled T1w
53
- found in ``target_data.reference_path``. The ``"reference_path"``
54
- key is added when :class:`.SpaceWarper` is used.
53
+ found in ``target_data.reference``. The ``"reference"``
54
+ key is added if the :class:`.SpaceWarper` is used or if the
55
+ data is provided in native space.
55
56
  target_data : dict
56
57
  The corresponding item of the data object to which the parcellation
57
58
  will be applied.
@@ -87,6 +88,10 @@ class ANTsParcellationWarper:
87
88
  # Warp data check
88
89
  if warp_data is None:
89
90
  raise_error("No `warp_data` provided")
91
+ if "reference" not in target_data:
92
+ raise_error("No `reference` provided")
93
+ if "path" not in target_data["reference"]:
94
+ raise_error("No `path` provided in `reference`")
90
95
 
91
96
  logger.debug("Using ANTs for parcellation transformation")
92
97
 
@@ -108,7 +113,7 @@ class ANTsParcellationWarper:
108
113
  "-n 'GenericLabel[NearestNeighbor]'",
109
114
  f"-i {prewarp_parcellation_path.resolve()}",
110
115
  # use resampled reference
111
- f"-r {target_data['reference_path'].resolve()}",
116
+ f"-r {target_data['reference']['path'].resolve()}",
112
117
  f"-t {warp_data['path'].resolve()}",
113
118
  f"-o {warped_parcellation_path.resolve()}",
114
119
  ]
@@ -78,7 +78,7 @@ class FSLParcellationWarper:
78
78
  "--interp=nn",
79
79
  f"-i {prewarp_parcellation_path.resolve()}",
80
80
  # use resampled reference
81
- f"-r {target_data['reference_path'].resolve()}",
81
+ f"-r {target_data['reference']['path'].resolve()}",
82
82
  f"-w {warp_data['path'].resolve()}",
83
83
  f"-o {warped_parcellation_path.resolve()}",
84
84
  ]
@@ -33,6 +33,8 @@ PATTERNS_SCHEMA = {
33
33
  "mandatory": ["pattern", "format"],
34
34
  "optional": ["mappings"],
35
35
  },
36
+ "reference": {"mandatory": ["pattern"], "optional": []},
37
+ "prewarp_space": {"mandatory": [], "optional": []},
36
38
  },
37
39
  },
38
40
  "Warp": {
@@ -59,7 +59,7 @@ class ANTsWarper:
59
59
  -------
60
60
  dict
61
61
  The ``input`` dictionary with modified ``data`` and ``space`` key
62
- values and new ``reference_path`` key whose value points to the
62
+ values and new ``reference`` key whose value points to the
63
63
  reference file used for warping.
64
64
 
65
65
  Raises
@@ -129,7 +129,7 @@ class ANTsWarper:
129
129
  # Load nifti
130
130
  input["data"] = nib.load(apply_transforms_out_path)
131
131
  # Save resampled reference path
132
- input["reference_path"] = resample_image_out_path
132
+ input["reference"] = {"path": resample_image_out_path}
133
133
  # Keep pre-warp space for further operations
134
134
  input["prewarp_space"] = input["space"]
135
135
  # Use reference input's space as warped input's space
@@ -55,7 +55,7 @@ class FSLWarper:
55
55
  -------
56
56
  dict
57
57
  The ``input`` dictionary with modified ``data`` and ``space`` key
58
- values and new ``reference_path`` key whose value points to the
58
+ values and new ``reference`` key whose value points to the
59
59
  reference file used for warping.
60
60
 
61
61
  Raises
@@ -116,7 +116,7 @@ class FSLWarper:
116
116
  # Load nifti
117
117
  input["data"] = nib.load(applywarp_out_path)
118
118
  # Save resampled reference path
119
- input["reference_path"] = flirt_out_path
119
+ input["reference"] = {"path": flirt_out_path}
120
120
  # Keep pre-warp space for further operations
121
121
  input["prewarp_space"] = input["space"]
122
122
  # Use reference input's space as warped input's space
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: junifer
3
- Version: 0.0.6.dev299
3
+ Version: 0.0.6.dev302
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>
@@ -1,6 +1,6 @@
1
1
  junifer/__init__.py,sha256=2McgH1yNue6Z1V26-uN_mfMjbTcx4CLhym-DMBl5xA4,266
2
2
  junifer/__init__.pyi,sha256=SsTvgq2Dod6UqJN96GH1lCphH6hJQQurEJHGNhHjGUI,508
3
- junifer/_version.py,sha256=725_F3dOAgOL9Sw-MMC-B_RSYBVTStBAyk4cmIorMWI,428
3
+ junifer/_version.py,sha256=6ivRaEJnq1nwi7sNAqQwwarVpyzKReHtuarvntATZ2E,428
4
4
  junifer/conftest.py,sha256=PWYkkRDU8ly2lYwv7VBKMHje4et6HX7Yey3Md_I2KbA,613
5
5
  junifer/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  junifer/stats.py,sha256=e9aaagMGtgpRfW3Wdpz9ocpnYld1IWylCDcjFUgX9Mk,6225
@@ -81,7 +81,7 @@ junifer/data/coordinates/__init__.py,sha256=ffM8rwcHLgHAWixJbKrATrbUKzX940V1UF6R
81
81
  junifer/data/coordinates/__init__.pyi,sha256=Z-Ti5XD3HigkZ8uYN6oYsLqw40-F1GvTVQ5QAy08Wng,88
82
82
  junifer/data/coordinates/_ants_coordinates_warper.py,sha256=5RWDC-nI3VG9lkSJ-_y_hlDtjPctKSJokQOp3v8ozwY,2956
83
83
  junifer/data/coordinates/_coordinates.py,sha256=fBXVvuTxYLTNBSrQiTCiQsxpT0SdbQze3DYuGGgz_mY,12501
84
- junifer/data/coordinates/_fsl_coordinates_warper.py,sha256=GI0SrkNyAuRsoRSxI5WNvQmtPXQ3MlXvPx9lrd3NYB4,2406
84
+ junifer/data/coordinates/_fsl_coordinates_warper.py,sha256=5h7rwiPMYBQlA3sMZUImcpnNLLWvIp2-bAEaaHtzX9c,2409
85
85
  junifer/data/coordinates/VOIs/meta/AutobiographicalMemory_VOIs.txt,sha256=9af38naeL18Tlt_gy_ep6vyTAxOB336JYjbo5FvP8PQ,686
86
86
  junifer/data/coordinates/VOIs/meta/CogAC_VOIs.txt,sha256=Sr5_E712OLdeQRyUcDNM0wLBvZIyO6gc9Q7KkyJHX1A,398
87
87
  junifer/data/coordinates/VOIs/meta/CogAR_VOIs.txt,sha256=t3NLwEVUZTPP34p15SaB3UInLrQyK-7Qc4iLBuQlZu8,189
@@ -104,8 +104,8 @@ junifer/data/coordinates/VOIs/meta/extDMN_VOIs.txt,sha256=Ogx1QvqZcnXDM3ncF2ha78
104
104
  junifer/data/coordinates/tests/test_coordinates.py,sha256=_c2P4oaDGpsmui5gJBe_jN6HLGiKxONkYPR69sRBUlU,4219
105
105
  junifer/data/masks/__init__.py,sha256=eEEhHglyVEx1LrqwXjq3cOmjf4sTsgBstRx5-k7zIQU,180
106
106
  junifer/data/masks/__init__.pyi,sha256=lcgr8gmWDPibC4RxnWBXb8DDpIkO73Aax09u6VXiJJI,114
107
- junifer/data/masks/_ants_mask_warper.py,sha256=yGjC-b6Ui-MpPG3FpRnI8pEAxjMUfSSuUGVIeazjN7I,5078
108
- junifer/data/masks/_fsl_mask_warper.py,sha256=_7UkX3-wFXQs4KwxopO-QjMyB6aeq1GAkiGSGpG-OzM,2412
107
+ junifer/data/masks/_ants_mask_warper.py,sha256=6ex2jxxKI5yA4G1rebSpcAYGGisflVK-DwhtUtWY964,5348
108
+ junifer/data/masks/_fsl_mask_warper.py,sha256=VApp-ofGBKePNmCdgTg1HoEA66lMQiAPT0ihkhB2ezY,2415
109
109
  junifer/data/masks/_masks.py,sha256=96NKsSSosD6r03Jb2N1xQoyOc2Vl5miokcQdSeuM6SY,20729
110
110
  junifer/data/masks/tests/test_masks.py,sha256=1Zm09ZSdUlR278DTCZeVuxuQntryefsnYYPP02MttVE,16120
111
111
  junifer/data/masks/ukb/UKB_15K_GM_template.nii.gz,sha256=jcX1pDOrDsoph8cPMNFVKH5gZYio5G4rJNpOFXm9wJI,946636
@@ -114,8 +114,8 @@ junifer/data/masks/vickery-patil/CAT12_IXI555_MNI152_TMP_GS_GMprob0.2_clean_3mm.
114
114
  junifer/data/masks/vickery-patil/GMprob0.2_cortex_3mm_NA_rm.nii.gz,sha256=jfMe_4H9XEnArYms5bSQbqS2V1_HbLHTfI5amQa_Pes,8700
115
115
  junifer/data/parcellations/__init__.py,sha256=6-Ysil3NyZ69V6rWx4RO15_d-iDKizfbHuxSjsHNt24,188
116
116
  junifer/data/parcellations/__init__.pyi,sha256=lhBHTbMDizzqUqVHrx2eyfPFodrTBgMFeTgxfESSkQ8,140
117
- junifer/data/parcellations/_ants_parcellation_warper.py,sha256=UBjO9W8jWcM8GK80pbIzORir60ZFAhLTttGtaaDNT2g,5530
118
- junifer/data/parcellations/_fsl_parcellation_warper.py,sha256=pUsLbR34Ry3e_0_5KxngI-jU06YmXTU795k-SjJHmig,2676
117
+ junifer/data/parcellations/_ants_parcellation_warper.py,sha256=4CYieBer6ow4i8o4NjKsfufc96XdtsMGwfBbMF-Kw78,5802
118
+ junifer/data/parcellations/_fsl_parcellation_warper.py,sha256=JfJ022flg5OR48P4OAALVHHQgTVxdMBXT-fAqBl3nUM,2679
119
119
  junifer/data/parcellations/_parcellations.py,sha256=uOqoucoynv--iEftrhdnOd3jBcqq9PSDgs9DYhbeN24,65611
120
120
  junifer/data/parcellations/tests/test_parcellations.py,sha256=crluGgUjocVZ0ZIkMpUVol27A-Px6oc2eflY5g0C4BY,38315
121
121
  junifer/data/tests/test_data_utils.py,sha256=136iGPjGecCxyqgUwU8VZMHoE6imcYJ0WNC32PDGK4g,1063
@@ -128,7 +128,7 @@ junifer/datagrabber/dmcc13_benchmark.py,sha256=VMyiwvkr4qSvzBICSksPPKOI2w_WVo06H
128
128
  junifer/datagrabber/multiple.py,sha256=4tCOzojs3hoG7daHJJ7HUsx15atWR5nTmyP0S0__aig,6666
129
129
  junifer/datagrabber/pattern.py,sha256=UwJQ0MObBIS6eHH9FfoM_sBYuNM9n5NAX7DA0HdtL1A,18709
130
130
  junifer/datagrabber/pattern_datalad.py,sha256=QPWXIToYHDU4mvm9lz_hy8BjdqqoCXiGiJKCcATrT-w,4568
131
- junifer/datagrabber/pattern_validation_mixin.py,sha256=MlcQIDyPHtqPcq1eHkwvrp-m5MhZaxTG1l2j3JM6FOc,19236
131
+ junifer/datagrabber/pattern_validation_mixin.py,sha256=6IlL5EMbr-XEtiiXs_buD3DJkujjs335BmAgAiWGZ3M,19369
132
132
  junifer/datagrabber/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
133
133
  junifer/datagrabber/aomic/__init__.py,sha256=ATxzXq9NBPmWowTMuL77zqrmIbbnk0Wd1iXtXCP3XDg,266
134
134
  junifer/datagrabber/aomic/__init__.pyi,sha256=Rp6C075fZDdKY8VIq508_g4NhVj8bWzR6zb9yln761Q,189
@@ -294,8 +294,8 @@ junifer/preprocess/smoothing/tests/test_smoothing.py,sha256=t1j3zEvJk5XLO4fzcb-w
294
294
  junifer/preprocess/tests/test_preprocess_base.py,sha256=-0rpe8QjqYES36H6MHuDs3cv_6upHBdVHnFMgQsmEX4,2571
295
295
  junifer/preprocess/warping/__init__.py,sha256=rzUUP7-6H_nygQ7a7TBZ4_RY7p0ELacosYsWQbSdVZk,214
296
296
  junifer/preprocess/warping/__init__.pyi,sha256=Drbqp8N3uprvXcKSxqdfj90fesz9XYVLgivhPnKAYcc,65
297
- junifer/preprocess/warping/_ants_warper.py,sha256=oJrTW_YG-VJ-piq_L1CX5fEoERyRtsMpFEQQ-0fUFMg,6502
298
- junifer/preprocess/warping/_fsl_warper.py,sha256=IV_vkn3TGDPWM_N-hEQv1YC4LYMTfZfDmuYu5MW_TQ8,3798
297
+ junifer/preprocess/warping/_ants_warper.py,sha256=BHfweLDtq3J8NmgUFvA7bfWIN4kDvo0RiB1fNDJ71qw,6502
298
+ junifer/preprocess/warping/_fsl_warper.py,sha256=yilHysV9t9bkBDK_eQzjROzlwhXStVzflCaEkxkwjlY,3798
299
299
  junifer/preprocess/warping/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
300
300
  junifer/preprocess/warping/space_warper.py,sha256=mf7SDu574R3TXNt82fqGl_hcEYx7SjXwz2TcmWObHQA,7706
301
301
  junifer/preprocess/warping/tests/test_space_warper.py,sha256=amFHtt-q7L7v9uL4cOvrmHEbUOGDhmoMHkLnKJ0dF7A,5543
@@ -341,10 +341,10 @@ junifer/utils/tests/test_config.py,sha256=7ltIXuwb_W4Mv_1dxQWyiyM10XgUAfsWKV6D_i
341
341
  junifer/utils/tests/test_fs.py,sha256=WQS7cKlKEZ742CIuiOYYpueeAhY9PqlastfDVpVVtvE,923
342
342
  junifer/utils/tests/test_helpers.py,sha256=k5qqfxK8dFyuewTJyR1Qn6-nFaYNuVr0ysc18bfPjyU,929
343
343
  junifer/utils/tests/test_logging.py,sha256=duO4ou365hxwa_kwihFtKPLaL6LC5XHiyhOijrrngbA,8009
344
- junifer-0.0.6.dev299.dist-info/AUTHORS.rst,sha256=rmULKpchpSol4ExWFdm-qu4fkpSZPYqIESVJBZtGb6E,163
345
- junifer-0.0.6.dev299.dist-info/LICENSE.md,sha256=MqCnOBu8uXsEOzRZWh9EBVfVz-kE9NkXcLCrtGXo2yU,34354
346
- junifer-0.0.6.dev299.dist-info/METADATA,sha256=BJYB-ABLfZGsNi7s6U-r36VN0lNHYn83wbqsdQX-DbU,8429
347
- junifer-0.0.6.dev299.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
348
- junifer-0.0.6.dev299.dist-info/entry_points.txt,sha256=6O8ru0BP-SP7YMUZiizFNoaZ2HvJpadO2G7nKk4PwjI,48
349
- junifer-0.0.6.dev299.dist-info/top_level.txt,sha256=4bAq1R2QFQ4b3hohjys2JBvxrl0GKk5LNFzYvz9VGcA,8
350
- junifer-0.0.6.dev299.dist-info/RECORD,,
344
+ junifer-0.0.6.dev302.dist-info/AUTHORS.rst,sha256=rmULKpchpSol4ExWFdm-qu4fkpSZPYqIESVJBZtGb6E,163
345
+ junifer-0.0.6.dev302.dist-info/LICENSE.md,sha256=MqCnOBu8uXsEOzRZWh9EBVfVz-kE9NkXcLCrtGXo2yU,34354
346
+ junifer-0.0.6.dev302.dist-info/METADATA,sha256=-xzY1LfIMeHg8ism1hOUBXsfcyjaW58Mu1VuATPtKXY,8429
347
+ junifer-0.0.6.dev302.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
348
+ junifer-0.0.6.dev302.dist-info/entry_points.txt,sha256=6O8ru0BP-SP7YMUZiizFNoaZ2HvJpadO2G7nKk4PwjI,48
349
+ junifer-0.0.6.dev302.dist-info/top_level.txt,sha256=4bAq1R2QFQ4b3hohjys2JBvxrl0GKk5LNFzYvz9VGcA,8
350
+ junifer-0.0.6.dev302.dist-info/RECORD,,