junifer 0.0.6.dev311__py3-none-any.whl → 0.0.6.dev324__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.dev311'
16
- __version_tuple__ = version_tuple = (0, 0, 6, 'dev311')
15
+ __version__ = version = '0.0.6.dev324'
16
+ __version_tuple__ = version_tuple = (0, 0, 6, 'dev324')
@@ -50,7 +50,7 @@ class AFNIALFF(metaclass=Singleton):
50
50
  @lru_cache(maxsize=None, typed=True)
51
51
  def compute(
52
52
  self,
53
- data: "Nifti1Image",
53
+ input_path: Path,
54
54
  highpass: float,
55
55
  lowpass: float,
56
56
  tr: Optional[float],
@@ -59,8 +59,8 @@ class AFNIALFF(metaclass=Singleton):
59
59
 
60
60
  Parameters
61
61
  ----------
62
- data : 4D Niimg-like object
63
- Images to process.
62
+ input_path : pathlib.Path
63
+ Path to the input data.
64
64
  highpass : positive float
65
65
  Highpass cutoff frequency.
66
66
  lowpass : positive float
@@ -82,19 +82,17 @@ class AFNIALFF(metaclass=Singleton):
82
82
  """
83
83
  logger.debug("Creating cache for ALFF computation via AFNI")
84
84
 
85
- # Create component-scoped tempdir
86
- tempdir = WorkDirManager().get_tempdir(prefix="afni_alff+falff")
87
-
88
- # Save target data to a component-scoped tempfile
89
- nifti_in_file_path = tempdir / "input.nii" # needs to be .nii
90
- nib.save(data, nifti_in_file_path)
85
+ # Create element-scoped tempdir
86
+ element_tempdir = WorkDirManager().get_element_tempdir(
87
+ prefix="afni_lff"
88
+ )
91
89
 
92
90
  # Set 3dRSFC command
93
- alff_falff_out_path_prefix = tempdir / "alff_falff"
91
+ lff_out_path_prefix = element_tempdir / "output"
94
92
  bp_cmd = [
95
93
  "3dRSFC",
96
- f"-prefix {alff_falff_out_path_prefix.resolve()}",
97
- f"-input {nifti_in_file_path.resolve()}",
94
+ f"-prefix {lff_out_path_prefix.resolve()}",
95
+ f"-input {input_path.resolve()}",
98
96
  f"-band {highpass} {lowpass}",
99
97
  "-no_rsfa -nosat -nodetrend",
100
98
  ]
@@ -104,49 +102,48 @@ class AFNIALFF(metaclass=Singleton):
104
102
  # Call 3dRSFC
105
103
  run_ext_cmd(name="3dRSFC", cmd=bp_cmd)
106
104
 
107
- # Create element-scoped tempdir so that the ALFF and fALFF maps are
108
- # available later as nibabel stores file path reference for
109
- # loading on computation
110
- element_tempdir = WorkDirManager().get_element_tempdir(
111
- prefix="afni_alff_falff"
112
- )
113
-
105
+ # Read header to get output suffix
106
+ niimg = nib.load(input_path)
107
+ header = niimg.header
108
+ sform_code = header.get_sform(coded=True)[1]
109
+ if sform_code == 4:
110
+ output_suffix = "tlrc"
111
+ else:
112
+ output_suffix = "orig"
113
+ # Set params suffix
114
114
  params_suffix = f"_{highpass}_{lowpass}_{tr}"
115
115
 
116
116
  # Convert alff afni to nifti
117
- alff_afni_to_nifti_out_path = (
118
- element_tempdir / f"alff{params_suffix}_output.nii"
117
+ alff_nifti_out_path = (
118
+ element_tempdir / f"output_alff{params_suffix}.nii"
119
119
  ) # needs to be .nii
120
120
  convert_alff_cmd = [
121
121
  "3dAFNItoNIFTI",
122
- f"-prefix {alff_afni_to_nifti_out_path.resolve()}",
123
- f"{alff_falff_out_path_prefix}_ALFF+orig.BRIK",
122
+ f"-prefix {alff_nifti_out_path.resolve()}",
123
+ f"{lff_out_path_prefix}_ALFF+{output_suffix}.BRIK",
124
124
  ]
125
125
  # Call 3dAFNItoNIFTI
126
126
  run_ext_cmd(name="3dAFNItoNIFTI", cmd=convert_alff_cmd)
127
127
 
128
128
  # Convert falff afni to nifti
129
- falff_afni_to_nifti_out_path = (
130
- element_tempdir / f"falff{params_suffix}_output.nii"
129
+ falff_nifti_out_path = (
130
+ element_tempdir / f"output_falff{params_suffix}.nii"
131
131
  ) # needs to be .nii
132
132
  convert_falff_cmd = [
133
133
  "3dAFNItoNIFTI",
134
- f"-prefix {falff_afni_to_nifti_out_path.resolve()}",
135
- f"{alff_falff_out_path_prefix}_fALFF+orig.BRIK",
134
+ f"-prefix {falff_nifti_out_path.resolve()}",
135
+ f"{lff_out_path_prefix}_fALFF+{output_suffix}.BRIK",
136
136
  ]
137
137
  # Call 3dAFNItoNIFTI
138
138
  run_ext_cmd(name="3dAFNItoNIFTI", cmd=convert_falff_cmd)
139
139
 
140
140
  # Load nifti
141
- alff_data = nib.load(alff_afni_to_nifti_out_path)
142
- falff_data = nib.load(falff_afni_to_nifti_out_path)
143
-
144
- # Delete tempdir
145
- WorkDirManager().delete_tempdir(tempdir)
141
+ alff_data = nib.load(alff_nifti_out_path)
142
+ falff_data = nib.load(falff_nifti_out_path)
146
143
 
147
144
  return (
148
145
  alff_data,
149
146
  falff_data,
150
- alff_afni_to_nifti_out_path,
151
- falff_afni_to_nifti_out_path,
152
- ) # type: ignore
147
+ alff_nifti_out_path,
148
+ falff_nifti_out_path,
149
+ )
@@ -47,7 +47,7 @@ class JuniferALFF(metaclass=Singleton):
47
47
  @lru_cache(maxsize=None, typed=True)
48
48
  def compute(
49
49
  self,
50
- data: "Nifti1Image",
50
+ input_path: Path,
51
51
  highpass: float,
52
52
  lowpass: float,
53
53
  tr: Optional[float],
@@ -56,8 +56,8 @@ class JuniferALFF(metaclass=Singleton):
56
56
 
57
57
  Parameters
58
58
  ----------
59
- data : 4D Niimg-like object
60
- Images to process.
59
+ input_path : pathlib.Path
60
+ Path to the input data.
61
61
  highpass : positive float
62
62
  Highpass cutoff frequency.
63
63
  lowpass : positive float
@@ -80,9 +80,10 @@ class JuniferALFF(metaclass=Singleton):
80
80
  logger.debug("Creating cache for ALFF computation via junifer")
81
81
 
82
82
  # Get scan data
83
- niimg_data = data.get_fdata().copy()
83
+ niimg = nib.load(input_path)
84
+ niimg_data = niimg.get_fdata().copy()
84
85
  if tr is None:
85
- tr = float(data.header["pixdim"][4]) # type: ignore
86
+ tr = float(niimg.header["pixdim"][4]) # type: ignore
86
87
  logger.info(f"`tr` not provided, using `tr` from header: {tr}")
87
88
 
88
89
  # Bandpass the data within the lowpass and highpass cutoff freqs
@@ -120,19 +121,17 @@ class JuniferALFF(metaclass=Singleton):
120
121
  # Calculate ALFF
121
122
  alff = numerator / np.sqrt(niimg_data.shape[-1])
122
123
  alff_data = nimg.new_img_like(
123
- ref_niimg=data,
124
+ ref_niimg=niimg,
124
125
  data=alff,
125
126
  )
126
127
  falff_data = nimg.new_img_like(
127
- ref_niimg=data,
128
+ ref_niimg=niimg,
128
129
  data=falff,
129
130
  )
130
131
 
131
- # Create element-scoped tempdir so that the ALFF and fALFF maps are
132
- # available later as nibabel stores file path reference for
133
- # loading on computation
132
+ # Create element-scoped tempdir
134
133
  element_tempdir = WorkDirManager().get_element_tempdir(
135
- prefix="junifer_alff+falff"
134
+ prefix="junifer_lff"
136
135
  )
137
136
  output_alff_path = element_tempdir / "output_alff.nii.gz"
138
137
  output_falff_path = element_tempdir / "output_falff.nii.gz"
@@ -146,7 +146,7 @@ class ALFFBase(BaseMarker):
146
146
  estimator = JuniferALFF()
147
147
  # Compute ALFF + fALFF
148
148
  alff, falff, alff_path, falff_path = estimator.compute( # type: ignore
149
- data=input_data["data"],
149
+ input_path=input_data["path"],
150
150
  highpass=self.highpass,
151
151
  lowpass=self.lowpass,
152
152
  tr=self.tr,
@@ -69,7 +69,9 @@ def test_ALFFSpheres(caplog: pytest.LogCaptureFixture, tmp_path: Path) -> None:
69
69
  # Fit transform marker on data
70
70
  output = marker.fit_transform(element_data)
71
71
 
72
- assert "Creating cache" in caplog.text
72
+ # Tests for ALFFParcels run before this with the same data and that
73
+ # should create the cache
74
+ assert "Calculating ALFF and fALFF" in caplog.text
73
75
 
74
76
  # Get BOLD output
75
77
  assert "BOLD" in output
@@ -50,7 +50,7 @@ class AFNIReHo(metaclass=Singleton):
50
50
  @lru_cache(maxsize=None, typed=True)
51
51
  def compute(
52
52
  self,
53
- data: "Nifti1Image",
53
+ input_path: Path,
54
54
  nneigh: int = 27,
55
55
  neigh_rad: Optional[float] = None,
56
56
  neigh_x: Optional[float] = None,
@@ -65,8 +65,8 @@ class AFNIReHo(metaclass=Singleton):
65
65
 
66
66
  Parameters
67
67
  ----------
68
- data : 4D Niimg-like object
69
- Images to process.
68
+ input_path : pathlib.Path
69
+ Path to the input data.
70
70
  nneigh : {7, 19, 27}, optional
71
71
  Number of voxels in the neighbourhood, inclusive. Can be:
72
72
 
@@ -128,19 +128,17 @@ class AFNIReHo(metaclass=Singleton):
128
128
  """
129
129
  logger.debug("Creating cache for ReHo computation via AFNI")
130
130
 
131
- # Create component-scoped tempdir
132
- tempdir = WorkDirManager().get_tempdir(prefix="afni_reho")
133
-
134
- # Save target data to a component-scoped tempfile
135
- nifti_in_file_path = tempdir / "input.nii" # needs to be .nii
136
- nib.save(data, nifti_in_file_path)
131
+ # Create element-scoped tempdir
132
+ element_tempdir = WorkDirManager().get_element_tempdir(
133
+ prefix="afni_reho"
134
+ )
137
135
 
138
136
  # Set 3dReHo command
139
- reho_out_path_prefix = tempdir / "reho"
137
+ reho_out_path_prefix = element_tempdir / "output"
140
138
  reho_cmd = [
141
139
  "3dReHo",
142
140
  f"-prefix {reho_out_path_prefix.resolve()}",
143
- f"-inset {nifti_in_file_path.resolve()}",
141
+ f"-inset {input_path.resolve()}",
144
142
  ]
145
143
  # Check ellipsoidal / cuboidal volume arguments
146
144
  if neigh_rad:
@@ -164,28 +162,28 @@ class AFNIReHo(metaclass=Singleton):
164
162
  # Call 3dReHo
165
163
  run_ext_cmd(name="3dReHo", cmd=reho_cmd)
166
164
 
167
- # Create element-scoped tempdir so that the ReHo map is
168
- # available later as nibabel stores file path reference for
169
- # loading on computation
170
- element_tempdir = WorkDirManager().get_element_tempdir(
171
- prefix="afni_reho"
172
- )
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
+
173
174
  # Convert afni to nifti
174
- reho_afni_to_nifti_out_path = (
175
+ reho_nifti_out_path = (
175
176
  element_tempdir / "output.nii" # needs to be .nii
176
177
  )
177
178
  convert_cmd = [
178
179
  "3dAFNItoNIFTI",
179
- f"-prefix {reho_afni_to_nifti_out_path.resolve()}",
180
- f"{reho_out_path_prefix}+orig.BRIK",
180
+ f"-prefix {reho_nifti_out_path.resolve()}",
181
+ f"{reho_out_path_prefix}+{output_suffix}.BRIK",
181
182
  ]
182
183
  # Call 3dAFNItoNIFTI
183
184
  run_ext_cmd(name="3dAFNItoNIFTI", cmd=convert_cmd)
184
185
 
185
186
  # Load nifti
186
- output_data = nib.load(reho_afni_to_nifti_out_path)
187
-
188
- # Delete tempdir
189
- WorkDirManager().delete_tempdir(tempdir)
187
+ output_data = nib.load(reho_nifti_out_path)
190
188
 
191
- return output_data, reho_afni_to_nifti_out_path # type: ignore
189
+ return output_data, reho_nifti_out_path
@@ -48,15 +48,15 @@ class JuniferReHo(metaclass=Singleton):
48
48
  @lru_cache(maxsize=None, typed=True)
49
49
  def compute(
50
50
  self,
51
- data: "Nifti1Image",
51
+ input_path: Path,
52
52
  nneigh: int = 27,
53
53
  ) -> tuple["Nifti1Image", Path]:
54
54
  """Compute ReHo map.
55
55
 
56
56
  Parameters
57
57
  ----------
58
- data : 4D Niimg-like object
59
- Images to process.
58
+ input_path : pathlib.Path
59
+ Path to the input data.
60
60
  nneigh : {7, 19, 27, 125}, optional
61
61
  Number of voxels in the neighbourhood, inclusive. Can be:
62
62
 
@@ -89,7 +89,8 @@ class JuniferReHo(metaclass=Singleton):
89
89
  logger.debug("Creating cache for ReHo computation via junifer")
90
90
 
91
91
  # Get scan data
92
- niimg_data = data.get_fdata()
92
+ niimg = nib.load(input_path)
93
+ niimg_data = niimg.get_fdata().copy()
93
94
  # Get scan dimensions
94
95
  n_x, n_y, n_z, _ = niimg_data.shape
95
96
 
@@ -119,7 +120,7 @@ class JuniferReHo(metaclass=Singleton):
119
120
  # after #299 is merged
120
121
  # Calculate whole brain mask
121
122
  mni152_whole_brain_mask = nmask.compute_brain_mask(
122
- target_img=data,
123
+ target_img=niimg,
123
124
  threshold=0.5,
124
125
  mask_type="whole-brain",
125
126
  )
@@ -227,7 +228,7 @@ class JuniferReHo(metaclass=Singleton):
227
228
 
228
229
  # Create new image like target image
229
230
  output_data = nimg.new_img_like(
230
- ref_niimg=data,
231
+ ref_niimg=niimg,
231
232
  data=reho_map,
232
233
  copy_header=False,
233
234
  )
@@ -125,7 +125,7 @@ class ReHoBase(BaseMarker):
125
125
  estimator = JuniferReHo()
126
126
  # Compute reho
127
127
  reho_map, reho_map_path = estimator.compute( # type: ignore
128
- data=input_data["data"],
128
+ input_path=input_data["path"],
129
129
  **reho_params,
130
130
  )
131
131
 
@@ -12,6 +12,7 @@ from typing import (
12
12
  Union,
13
13
  )
14
14
 
15
+ import nibabel as nib
15
16
  import numpy as np
16
17
  import pandas as pd
17
18
  from nilearn import image as nimg
@@ -19,6 +20,7 @@ from nilearn._utils.niimg_conversions import check_niimg_4d
19
20
 
20
21
  from ...api.decorators import register_preprocessor
21
22
  from ...data import get_data
23
+ from ...pipeline import WorkDirManager
22
24
  from ...typing import Dependencies
23
25
  from ...utils import logger, raise_error
24
26
  from ..base import BasePreprocessor
@@ -539,9 +541,17 @@ class fMRIPrepConfoundRemover(BasePreprocessor):
539
541
  logger.info(
540
542
  f"Read t_r from NIfTI header: {t_r}",
541
543
  )
544
+
545
+ # Create element-specific tempdir for storing generated data
546
+ # and / or mask
547
+ element_tempdir = WorkDirManager().get_element_tempdir(
548
+ prefix="fmriprep_confound_remover"
549
+ )
550
+
542
551
  # Set mask data
543
552
  mask_img = None
544
553
  if self.masks is not None:
554
+ # Generate mask
545
555
  logger.debug(f"Masking with {self.masks}")
546
556
  mask_img = get_data(
547
557
  kind="mask",
@@ -549,13 +559,21 @@ class fMRIPrepConfoundRemover(BasePreprocessor):
549
559
  target_data=input,
550
560
  extra_input=extra_input,
551
561
  )
552
- # Return the BOLD mask and link it to the BOLD data type dict;
562
+ # Save generated mask for use later
563
+ generated_mask_img_path = element_tempdir / "generated_mask.nii.gz"
564
+ nib.save(mask_img, generated_mask_img_path)
565
+
566
+ # Save BOLD mask and link it to the BOLD data type dict;
553
567
  # this allows to use "inherit" down the pipeline
554
568
  logger.debug("Setting `BOLD.mask`")
555
569
  input.update(
556
570
  {
557
571
  "mask": {
572
+ # Update path to sync with "data"
573
+ "path": generated_mask_img_path,
574
+ # Update data
558
575
  "data": mask_img,
576
+ # Should be in the same space as target data
559
577
  "space": input["space"],
560
578
  }
561
579
  }
@@ -566,7 +584,9 @@ class fMRIPrepConfoundRemover(BasePreprocessor):
566
584
  logger.debug(f"\tstandardize: {self.standardize}")
567
585
  logger.debug(f"\tlow_pass: {self.low_pass}")
568
586
  logger.debug(f"\thigh_pass: {self.high_pass}")
569
- input["data"] = nimg.clean_img(
587
+
588
+ # Deconfound data
589
+ cleaned_img = nimg.clean_img(
570
590
  imgs=bold_img,
571
591
  detrend=self.detrend,
572
592
  standardize=self.standardize,
@@ -576,5 +596,18 @@ class fMRIPrepConfoundRemover(BasePreprocessor):
576
596
  t_r=t_r,
577
597
  mask_img=mask_img,
578
598
  )
599
+ # Save deconfounded data
600
+ deconfounded_img_path = element_tempdir / "deconfounded_data.nii.gz"
601
+ nib.save(cleaned_img, deconfounded_img_path)
602
+
603
+ logger.debug("Updating `BOLD`")
604
+ input.update(
605
+ {
606
+ # Update path to sync with "data"
607
+ "path": deconfounded_img_path,
608
+ # Update data
609
+ "data": cleaned_img,
610
+ }
611
+ )
579
612
 
580
613
  return input, None
@@ -4,7 +4,7 @@
4
4
  # License: AGPL
5
5
 
6
6
  from typing import (
7
- TYPE_CHECKING,
7
+ Any,
8
8
  ClassVar,
9
9
  Union,
10
10
  )
@@ -16,10 +16,6 @@ from ...typing import Dependencies, ExternalDependencies
16
16
  from ...utils import logger, run_ext_cmd
17
17
 
18
18
 
19
- if TYPE_CHECKING:
20
- from nibabel.nifti1 import Nifti1Image
21
-
22
-
23
19
  __all__ = ["AFNISmoothing"]
24
20
 
25
21
 
@@ -41,23 +37,23 @@ class AFNISmoothing:
41
37
 
42
38
  def preprocess(
43
39
  self,
44
- data: "Nifti1Image",
40
+ input: dict[str, Any],
45
41
  fwhm: Union[int, float],
46
- ) -> "Nifti1Image":
42
+ ) -> dict[str, Any]:
47
43
  """Preprocess using AFNI.
48
44
 
49
45
  Parameters
50
46
  ----------
51
- data : Niimg-like object
52
- Image(s) to preprocess.
47
+ input : dict
48
+ A single input from the Junifer Data object in which to preprocess.
53
49
  fwhm : int or float
54
50
  Smooth until the value. AFNI estimates the smoothing and then
55
51
  applies smoothing to reach ``fwhm``.
56
52
 
57
53
  Returns
58
54
  -------
59
- Niimg-like object
60
- The preprocessed image(s).
55
+ dict
56
+ The ``input`` dictionary with updated values.
61
57
 
62
58
  Notes
63
59
  -----
@@ -71,18 +67,18 @@ class AFNISmoothing:
71
67
  """
72
68
  logger.info("Smoothing using AFNI")
73
69
 
74
- # Create component-scoped tempdir
75
- tempdir = WorkDirManager().get_tempdir(prefix="afni_smoothing")
76
-
77
- # Save target data to a component-scoped tempfile
78
- nifti_in_file_path = tempdir / "input.nii" # needs to be .nii
79
- nib.save(data, nifti_in_file_path)
70
+ # Create element-scoped tempdir so that the output is
71
+ # available later as nibabel stores file path reference for
72
+ # loading on computation
73
+ element_tempdir = WorkDirManager().get_element_tempdir(
74
+ prefix="afni_smoothing"
75
+ )
80
76
 
81
77
  # Set 3dBlurToFWHM command
82
- blur_out_path_prefix = tempdir / "blur"
78
+ blur_out_path_prefix = element_tempdir / "blur"
83
79
  blur_cmd = [
84
80
  "3dBlurToFWHM",
85
- f"-input {nifti_in_file_path.resolve()}",
81
+ f"-input {input['path'].resolve()}",
86
82
  f"-prefix {blur_out_path_prefix.resolve()}",
87
83
  "-automask",
88
84
  f"-FWHM {fwhm}",
@@ -90,28 +86,34 @@ class AFNISmoothing:
90
86
  # Call 3dBlurToFWHM
91
87
  run_ext_cmd(name="3dBlurToFWHM", cmd=blur_cmd)
92
88
 
93
- # Create element-scoped tempdir so that the blurred output is
94
- # available later as nibabel stores file path reference for
95
- # loading on computation
96
- element_tempdir = WorkDirManager().get_element_tempdir(
97
- prefix="afni_blur"
98
- )
89
+ # Read header to get output suffix
90
+ header = input["data"].header
91
+ sform_code = header.get_sform(coded=True)[1]
92
+ if sform_code == 4:
93
+ output_suffix = "tlrc"
94
+ else:
95
+ output_suffix = "orig"
96
+
99
97
  # Convert afni to nifti
100
- blur_afni_to_nifti_out_path = (
101
- element_tempdir / "output.nii" # needs to be .nii
98
+ blur_nifti_out_path = (
99
+ element_tempdir / "smoothed_data.nii" # needs to be .nii
102
100
  )
103
101
  convert_cmd = [
104
102
  "3dAFNItoNIFTI",
105
- f"-prefix {blur_afni_to_nifti_out_path.resolve()}",
106
- f"{blur_out_path_prefix}+orig.BRIK",
103
+ f"-prefix {blur_nifti_out_path.resolve()}",
104
+ f"{blur_out_path_prefix}+{output_suffix}.BRIK",
107
105
  ]
108
106
  # Call 3dAFNItoNIFTI
109
107
  run_ext_cmd(name="3dAFNItoNIFTI", cmd=convert_cmd)
110
108
 
111
- # Load nifti
112
- output_data = nib.load(blur_afni_to_nifti_out_path)
113
-
114
- # Delete tempdir
115
- WorkDirManager().delete_tempdir(tempdir)
109
+ logger.debug("Updating smoothed data")
110
+ input.update(
111
+ {
112
+ # Update path to sync with "data"
113
+ "path": blur_nifti_out_path,
114
+ # Load nifti
115
+ "data": nib.load(blur_nifti_out_path),
116
+ }
117
+ )
116
118
 
117
- return output_data # type: ignore
119
+ return input
@@ -4,7 +4,7 @@
4
4
  # License: AGPL
5
5
 
6
6
  from typing import (
7
- TYPE_CHECKING,
7
+ Any,
8
8
  ClassVar,
9
9
  )
10
10
 
@@ -15,10 +15,6 @@ from ...typing import Dependencies, ExternalDependencies
15
15
  from ...utils import logger, run_ext_cmd
16
16
 
17
17
 
18
- if TYPE_CHECKING:
19
- from nibabel.nifti1 import Nifti1Image
20
-
21
-
22
18
  __all__ = ["FSLSmoothing"]
23
19
 
24
20
 
@@ -40,16 +36,16 @@ class FSLSmoothing:
40
36
 
41
37
  def preprocess(
42
38
  self,
43
- data: "Nifti1Image",
39
+ input: dict[str, Any],
44
40
  brightness_threshold: float,
45
41
  fwhm: float,
46
- ) -> "Nifti1Image":
42
+ ) -> dict[str, Any]:
47
43
  """Preprocess using FSL.
48
44
 
49
45
  Parameters
50
46
  ----------
51
- data : Niimg-like object
52
- Image(s) to preprocess.
47
+ input : dict
48
+ A single input from the Junifer Data object in which to preprocess.
53
49
  brightness_threshold : float
54
50
  Threshold to discriminate between noise and the underlying image.
55
51
  The value should be set greater than the noise level and less than
@@ -59,8 +55,8 @@ class FSLSmoothing:
59
55
 
60
56
  Returns
61
57
  -------
62
- Niimg-like object
63
- The preprocessed image(s).
58
+ dict
59
+ The ``input`` dictionary with updated values.
64
60
 
65
61
  Notes
66
62
  -----
@@ -76,24 +72,17 @@ class FSLSmoothing:
76
72
  """
77
73
  logger.info("Smoothing using FSL")
78
74
 
79
- # Create component-scoped tempdir
80
- tempdir = WorkDirManager().get_tempdir(prefix="fsl_smoothing")
81
-
82
- # Save target data to a component-scoped tempfile
83
- nifti_in_file_path = tempdir / "input.nii.gz"
84
- nib.save(data, nifti_in_file_path)
85
-
86
75
  # Create element-scoped tempdir so that the output is
87
76
  # available later as nibabel stores file path reference for
88
77
  # loading on computation
89
78
  element_tempdir = WorkDirManager().get_element_tempdir(
90
79
  prefix="fsl_susan"
91
80
  )
92
- susan_out_path = element_tempdir / "output.nii.gz"
81
+ susan_out_path = element_tempdir / "smoothed_data.nii.gz"
93
82
  # Set susan command
94
83
  susan_cmd = [
95
84
  "susan",
96
- f"{nifti_in_file_path.resolve()}",
85
+ f"{input['path'].resolve()}",
97
86
  f"{brightness_threshold}",
98
87
  f"{fwhm}",
99
88
  "3", # dimension
@@ -104,10 +93,14 @@ class FSLSmoothing:
104
93
  # Call susan
105
94
  run_ext_cmd(name="susan", cmd=susan_cmd)
106
95
 
107
- # Load nifti
108
- output_data = nib.load(susan_out_path)
109
-
110
- # Delete tempdir
111
- WorkDirManager().delete_tempdir(tempdir)
96
+ logger.debug("Updating smoothed data")
97
+ input.update(
98
+ {
99
+ # Update path to sync with "data"
100
+ "path": susan_out_path,
101
+ # Load nifti
102
+ "data": nib.load(susan_out_path),
103
+ }
104
+ )
112
105
 
113
- return output_data # type: ignore
106
+ return input
@@ -4,23 +4,21 @@
4
4
  # License: AGPL
5
5
 
6
6
  from typing import (
7
- TYPE_CHECKING,
7
+ Any,
8
8
  ClassVar,
9
9
  Literal,
10
10
  Union,
11
11
  )
12
12
 
13
+ import nibabel as nib
13
14
  from nilearn import image as nimg
14
15
  from numpy.typing import ArrayLike
15
16
 
17
+ from ...pipeline import WorkDirManager
16
18
  from ...typing import Dependencies
17
19
  from ...utils import logger
18
20
 
19
21
 
20
- if TYPE_CHECKING:
21
- from nibabel.nifti1 import Nifti1Image
22
-
23
-
24
22
  __all__ = ["NilearnSmoothing"]
25
23
 
26
24
 
@@ -35,15 +33,15 @@ class NilearnSmoothing:
35
33
 
36
34
  def preprocess(
37
35
  self,
38
- data: "Nifti1Image",
36
+ input: dict[str, Any],
39
37
  fwhm: Union[int, float, ArrayLike, Literal["fast"], None],
40
- ) -> "Nifti1Image":
38
+ ) -> dict[str, Any]:
41
39
  """Preprocess using nilearn.
42
40
 
43
41
  Parameters
44
42
  ----------
45
- data : Niimg-like object
46
- Image(s) to preprocess.
43
+ input : dict
44
+ A single input from the Junifer Data object in which to preprocess.
47
45
  fwhm : scalar, ``numpy.ndarray``, tuple or list of scalar, "fast" or \
48
46
  None
49
47
  Smoothing strength, as a full-width at half maximum, in
@@ -61,9 +59,32 @@ class NilearnSmoothing:
61
59
 
62
60
  Returns
63
61
  -------
64
- Niimg-like object
65
- The preprocessed image(s).
62
+ dict
63
+ The ``input`` dictionary with updated values.
66
64
 
67
65
  """
68
66
  logger.info("Smoothing using nilearn")
69
- return nimg.smooth_img(imgs=data, fwhm=fwhm) # type: ignore
67
+
68
+ # Create element-scoped tempdir so that the output is
69
+ # available later as nibabel stores file path reference for
70
+ # loading on computation
71
+ element_tempdir = WorkDirManager().get_element_tempdir(
72
+ prefix="nilearn_smoothing"
73
+ )
74
+
75
+ smoothed_img = nimg.smooth_img(imgs=input["data"], fwhm=fwhm)
76
+
77
+ # Save smoothed output
78
+ smoothed_img_path = element_tempdir / "smoothed_data.nii.gz"
79
+ nib.save(smoothed_img, smoothed_img_path)
80
+
81
+ logger.debug("Updating smoothed data")
82
+ input.update(
83
+ {
84
+ # Update path to sync with "data"
85
+ "path": smoothed_img_path,
86
+ "data": smoothed_img,
87
+ }
88
+ )
89
+
90
+ return input
@@ -164,12 +164,9 @@ class Smoothing(BasePreprocessor):
164
164
  elif self.using == "fsl":
165
165
  preprocessor = FSLSmoothing()
166
166
  # Smooth
167
- output = preprocessor.preprocess( # type: ignore
168
- data=input["data"],
167
+ input = preprocessor.preprocess(
168
+ input=input,
169
169
  **self.smoothing_params,
170
170
  )
171
171
 
172
- # Modify target data
173
- input["data"] = output
174
-
175
172
  return input, None
@@ -58,9 +58,7 @@ class ANTsWarper:
58
58
  Returns
59
59
  -------
60
60
  dict
61
- The ``input`` dictionary with modified ``data`` and ``space`` key
62
- values and new ``reference`` key whose value points to the
63
- reference file used for warping.
61
+ The ``input`` dictionary with updated values.
64
62
 
65
63
  Raises
66
64
  ------
@@ -110,7 +108,7 @@ class ANTsWarper:
110
108
  run_ext_cmd(name="ResampleImage", cmd=resample_image_cmd)
111
109
 
112
110
  # Create a tempfile for warped output
113
- apply_transforms_out_path = element_tempdir / "output.nii.gz"
111
+ apply_transforms_out_path = element_tempdir / "warped_data.nii.gz"
114
112
  # Set antsApplyTransforms command
115
113
  apply_transforms_cmd = [
116
114
  "antsApplyTransforms",
@@ -126,14 +124,59 @@ class ANTsWarper:
126
124
  # Call antsApplyTransforms
127
125
  run_ext_cmd(name="antsApplyTransforms", cmd=apply_transforms_cmd)
128
126
 
129
- # Load nifti
130
- input["data"] = nib.load(apply_transforms_out_path)
131
- # Save resampled reference path
132
- input["reference"] = {"path": resample_image_out_path}
133
- # Keep pre-warp space for further operations
134
- input["prewarp_space"] = input["space"]
135
- # Use reference input's space as warped input's space
136
- input["space"] = extra_input["T1w"]["space"]
127
+ logger.debug("Updating warped data")
128
+ input.update(
129
+ {
130
+ # Update path to sync with "data"
131
+ "path": apply_transforms_out_path,
132
+ # Load nifti
133
+ "data": nib.load(apply_transforms_out_path),
134
+ # Use reference input's space as warped input's space
135
+ "space": extra_input["T1w"]["space"],
136
+ # Save resampled reference path
137
+ "reference": {"path": resample_image_out_path},
138
+ # Keep pre-warp space for further operations
139
+ "prewarp_space": input["space"],
140
+ }
141
+ )
142
+
143
+ # Check for data type's mask and warp if found
144
+ if input.get("mask") is not None:
145
+ # Create a tempfile for warped mask output
146
+ apply_transforms_mask_out_path = (
147
+ element_tempdir / "warped_mask.nii.gz"
148
+ )
149
+ # Set antsApplyTransforms command
150
+ apply_transforms_mask_cmd = [
151
+ "antsApplyTransforms",
152
+ "-d 3",
153
+ "-e 3",
154
+ "-n 'GenericLabel[NearestNeighbor]'",
155
+ f"-i {input['mask']['path'].resolve()}",
156
+ # use resampled reference
157
+ f"-r {input['reference']['path'].resolve()}",
158
+ f"-t {warp_file_path.resolve()}",
159
+ f"-o {apply_transforms_mask_out_path.resolve()}",
160
+ ]
161
+ # Call antsApplyTransforms
162
+ run_ext_cmd(
163
+ name="antsApplyTransforms", cmd=apply_transforms_mask_cmd
164
+ )
165
+
166
+ logger.debug("Updating warped mask data")
167
+ input.update(
168
+ {
169
+ "mask": {
170
+ # Update path to sync with "data"
171
+ "path": apply_transforms_mask_out_path,
172
+ # Load nifti
173
+ "data": nib.load(apply_transforms_mask_out_path),
174
+ # Use reference input's space as warped input
175
+ # mask's space
176
+ "space": extra_input["T1w"]["space"],
177
+ }
178
+ }
179
+ )
137
180
 
138
181
  # Template space warping
139
182
  else:
@@ -149,16 +192,15 @@ class ANTsWarper:
149
192
  target_data=input,
150
193
  extra_input=None,
151
194
  )
152
-
153
- # Create component-scoped tempdir
154
- tempdir = WorkDirManager().get_tempdir(prefix="ants_warper")
155
195
  # Save template
156
- template_space_img_path = tempdir / f"{reference}_T1w.nii.gz"
196
+ template_space_img_path = (
197
+ element_tempdir / f"{reference}_T1w.nii.gz"
198
+ )
157
199
  nib.save(template_space_img, template_space_img_path)
158
200
 
159
201
  # Create a tempfile for warped output
160
202
  warped_output_path = element_tempdir / (
161
- f"data_warped_from_{input['space']}_to_" f"{reference}.nii.gz"
203
+ f"warped_data_from_{input['space']}_to_{reference}.nii.gz"
162
204
  )
163
205
 
164
206
  # Set antsApplyTransforms command
@@ -175,14 +217,58 @@ class ANTsWarper:
175
217
  # Call antsApplyTransforms
176
218
  run_ext_cmd(name="antsApplyTransforms", cmd=apply_transforms_cmd)
177
219
 
178
- # Delete tempdir
179
- WorkDirManager().delete_tempdir(tempdir)
220
+ logger.debug("Updating warped data")
221
+ input.update(
222
+ {
223
+ # Update path to sync with "data"
224
+ "path": warped_output_path,
225
+ # Load nifti
226
+ "data": nib.load(warped_output_path),
227
+ # Update warped input's space
228
+ "space": reference,
229
+ # Save reference path
230
+ "reference": {"path": template_space_img_path},
231
+ # Keep pre-warp space for further operations
232
+ "prewarp_space": input["space"],
233
+ }
234
+ )
235
+
236
+ # Check for data type's mask and warp if found
237
+ if input.get("mask") is not None:
238
+ # Create a tempfile for warped mask output
239
+ apply_transforms_mask_out_path = element_tempdir / (
240
+ f"warped_mask_from_{input['space']}_to_"
241
+ f"{reference}.nii.gz"
242
+ )
243
+ # Set antsApplyTransforms command
244
+ apply_transforms_mask_cmd = [
245
+ "antsApplyTransforms",
246
+ "-d 3",
247
+ "-e 3",
248
+ "-n 'GenericLabel[NearestNeighbor]'",
249
+ f"-i {input['mask']['path'].resolve()}",
250
+ # use resampled reference
251
+ f"-r {input['reference']['path'].resolve()}",
252
+ f"-t {xfm_file_path.resolve()}",
253
+ f"-o {apply_transforms_mask_out_path.resolve()}",
254
+ ]
255
+ # Call antsApplyTransforms
256
+ run_ext_cmd(
257
+ name="antsApplyTransforms", cmd=apply_transforms_mask_cmd
258
+ )
180
259
 
181
- # Modify target data
182
- input["data"] = nib.load(warped_output_path)
183
- # Keep pre-warp space for further operations
184
- input["prewarp_space"] = input["space"]
185
- # Update warped input's space
186
- input["space"] = reference
260
+ logger.debug("Updating warped mask data")
261
+ input.update(
262
+ {
263
+ "mask": {
264
+ # Update path to sync with "data"
265
+ "path": apply_transforms_mask_out_path,
266
+ # Load nifti
267
+ "data": nib.load(apply_transforms_mask_out_path),
268
+ # Update warped input mask's space
269
+ "space": reference,
270
+ }
271
+ }
272
+ )
187
273
 
188
274
  return input
@@ -54,9 +54,7 @@ class FSLWarper:
54
54
  Returns
55
55
  -------
56
56
  dict
57
- The ``input`` dictionary with modified ``data`` and ``space`` key
58
- values and new ``reference`` key whose value points to the
59
- reference file used for warping.
57
+ The ``input`` dictionary with updated values.
60
58
 
61
59
  Raises
62
60
  ------
@@ -100,26 +98,66 @@ class FSLWarper:
100
98
  run_ext_cmd(name="flirt", cmd=flirt_cmd)
101
99
 
102
100
  # Create a tempfile for warped output
103
- applywarp_out_path = element_tempdir / "output.nii.gz"
101
+ applywarp_out_path = element_tempdir / "warped_data.nii.gz"
104
102
  # Set applywarp command
105
103
  applywarp_cmd = [
106
104
  "applywarp",
107
105
  "--interp=spline",
108
106
  f"-i {input['path'].resolve()}",
109
- f"-r {flirt_out_path.resolve()}", # use resampled reference
107
+ # use resampled reference
108
+ f"-r {flirt_out_path.resolve()}",
110
109
  f"-w {warp_file_path.resolve()}",
111
110
  f"-o {applywarp_out_path.resolve()}",
112
111
  ]
113
112
  # Call applywarp
114
113
  run_ext_cmd(name="applywarp", cmd=applywarp_cmd)
115
114
 
116
- # Load nifti
117
- input["data"] = nib.load(applywarp_out_path)
118
- # Save resampled reference path
119
- input["reference"] = {"path": flirt_out_path}
120
- # Keep pre-warp space for further operations
121
- input["prewarp_space"] = input["space"]
122
- # Use reference input's space as warped input's space
123
- input["space"] = extra_input["T1w"]["space"]
115
+ logger.debug("Updating warped data")
116
+ input.update(
117
+ {
118
+ # Update path to sync with "data"
119
+ "path": applywarp_out_path,
120
+ # Load nifti
121
+ "data": nib.load(applywarp_out_path),
122
+ # Use reference input's space as warped input's space
123
+ "space": extra_input["T1w"]["space"],
124
+ # Save resampled reference path
125
+ "reference": {"path": flirt_out_path},
126
+ # Keep pre-warp space for further operations
127
+ "prewarp_space": input["space"],
128
+ }
129
+ )
130
+
131
+ # Check for data type's mask and warp if found
132
+ if input.get("mask") is not None:
133
+ # Create a tempfile for warped mask output
134
+ applywarp_mask_out_path = element_tempdir / "warped_mask.nii.gz"
135
+ # Set applywarp command
136
+ applywarp_mask_cmd = [
137
+ "applywarp",
138
+ "--interp=nn",
139
+ f"-i {input['mask']['path'].resolve()}",
140
+ # use resampled reference
141
+ f"-r {input['reference']['path'].resolve()}",
142
+ f"-w {warp_file_path.resolve()}",
143
+ f"-o {applywarp_mask_out_path.resolve()}",
144
+ ]
145
+ # Call applywarp
146
+ run_ext_cmd(name="applywarp", cmd=applywarp_mask_cmd)
147
+
148
+ logger.debug("Updating warped mask data")
149
+ input.update(
150
+ {
151
+ "mask": {
152
+ # Update path to sync with "data"
153
+ "path": applywarp_mask_out_path,
154
+ # Load nifti
155
+ "data": nib.load(applywarp_mask_out_path),
156
+ # Use reference input's space as warped input mask's
157
+ # space
158
+ "space": extra_input["T1w"]["space"],
159
+ }
160
+ }
161
+ )
124
162
 
125
163
  return input
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: junifer
3
- Version: 0.0.6.dev311
3
+ Version: 0.0.6.dev324
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=Um0qpMM5T1_-HjlNcQSFRjfl7t4PTi-Tmwj5GjnZBzM,428
3
+ junifer/_version.py,sha256=Mek99XWm9XI8ealUwe-651JH0dQXcrlgJtYJdIejdA4,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
@@ -208,14 +208,14 @@ junifer/markers/complexity/tests/test_sample_entropy.py,sha256=rfbiguVq7CUwYIvYB
208
208
  junifer/markers/complexity/tests/test_weighted_perm_entropy.py,sha256=yDWKEaUbxrnrG6J2NlktLfwSBre5OuXd63kEof7t8PM,2373
209
209
  junifer/markers/falff/__init__.py,sha256=qxdx_3FsVrn7h3gtbocK0ZmvqZwPQZGKuVkPm31ejNM,217
210
210
  junifer/markers/falff/__init__.pyi,sha256=X-q2zBjUX0imQ37yN2Cg5gKfDvq8sh_9y2hRH4g5ufY,120
211
- junifer/markers/falff/_afni_falff.py,sha256=D_hhT-rfWXeIe-Pwh4pK2O7N9Q07VyMOUHeAz6Ooudo,4518
212
- junifer/markers/falff/_junifer_falff.py,sha256=TnZ6T8u0f0YitJ7KRk4gMcC1tv6UW8m4VVcvcjGRsL0,4450
213
- junifer/markers/falff/falff_base.py,sha256=XZcBfXA74tWrW--uCALkRLl1tB7toR3_HfzPJUblz8g,4909
211
+ junifer/markers/falff/_afni_falff.py,sha256=PYkSOFMyaHoGYDvmBjKLW1ALyWBe7yI36JBqZ71ji2c,4223
212
+ junifer/markers/falff/_junifer_falff.py,sha256=1PsavcopVjPtfmPZsnNi5ynl2GTfnCx9qjuKDb7YejE,4347
213
+ junifer/markers/falff/falff_base.py,sha256=WtJTMRn_Vmv9RZaaeLeyZpCsQc8QgB3UqIPWsUI3Lh4,4915
214
214
  junifer/markers/falff/falff_parcels.py,sha256=sSb6QLaJKpL0GCTRWW3RnpOZCoy1f9lDLgJ0I_W_LlM,6017
215
215
  junifer/markers/falff/falff_spheres.py,sha256=GrakJYPB01y9BNBXM8WzWaae0mC-S06txiycvfBGcj0,6656
216
216
  junifer/markers/falff/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
217
217
  junifer/markers/falff/tests/test_falff_parcels.py,sha256=Z3n1i8dkYbdXgouUjfIif9yLv5MubBEdrtAA-a6kRcc,4349
218
- junifer/markers/falff/tests/test_falff_spheres.py,sha256=-VLEvFaF8CMCN_7FLYCSfP7MMjy-gm1Zgu13je5Pku8,4373
218
+ junifer/markers/falff/tests/test_falff_spheres.py,sha256=PGsxFjMxsH8HxIHVtdcQcX8suFa18ma_12Almknzn88,4503
219
219
  junifer/markers/functional_connectivity/__init__.py,sha256=dGTn69eS7a3rylMQh_wKlO28UmYGjsoDEGu4q5sgQFA,230
220
220
  junifer/markers/functional_connectivity/__init__.pyi,sha256=qfw6WVyE65u-5NZNi0xPa8zZVtkRfFvwyl4jHH2Xl00,539
221
221
  junifer/markers/functional_connectivity/crossparcellation_functional_connectivity.py,sha256=uLdVGywmL7qrzloh1YBL4g4tPiamA47MgHF2DQH0JTU,5733
@@ -233,10 +233,10 @@ junifer/markers/functional_connectivity/tests/test_functional_connectivity_parce
233
233
  junifer/markers/functional_connectivity/tests/test_functional_connectivity_spheres.py,sha256=A9OtFdndiSGOcPHH-QLPh6qoiD03A6KjM_emwxAlPg0,4145
234
234
  junifer/markers/reho/__init__.py,sha256=WZf4A0XaRThjl8SlFOhvTLUfhTHp5koLxZgowsgTSAE,211
235
235
  junifer/markers/reho/__init__.pyi,sha256=_aFb-Ry_EP2OMU6xRL4GlfuDpSl_egHllL-fz7vXjcE,118
236
- junifer/markers/reho/_afni_reho.py,sha256=YBqNYipZO8EFM4Jmek_A36zr9n4nTR0RVDPpxjJKLxM,6466
237
- junifer/markers/reho/_junifer_reho.py,sha256=86oBH8UtWsHJJGz2-uRXAjdGNHvaSV6Xu1v7-9AJqLs,9340
236
+ junifer/markers/reho/_afni_reho.py,sha256=SOWR5y9AYKfw1wj2Z4Wy7ckMUVTmeS378bayvPPVqqo,6225
237
+ junifer/markers/reho/_junifer_reho.py,sha256=14ObaRa2-0JzcoYLJyhnx4bgPCpTdciDXmrn9-gPv20,9387
238
238
  junifer/markers/reho/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
239
- junifer/markers/reho/reho_base.py,sha256=Amji7hNtkT9D-teJ2tTzDsVHKRXETDwhICDKa8ZGehY,4071
239
+ junifer/markers/reho/reho_base.py,sha256=Q88TbhIM4rQWdeQPLwwxwZ9DrR8l09orD1rdTkSYDtc,4077
240
240
  junifer/markers/reho/reho_parcels.py,sha256=UE1ia3uqbmTcZMc_FI625xVPLxBYvwpfrcvhekopbkI,6392
241
241
  junifer/markers/reho/reho_spheres.py,sha256=FCC2qncC85Kd82hg-MOu4T7NAKEkXHUaCcwC9taau9Y,6996
242
242
  junifer/markers/reho/tests/test_reho_parcels.py,sha256=bRtDi91qRcRYaRqqQjuSU6NuNz-KwLVCoTYo-e5VmsI,4075
@@ -280,22 +280,22 @@ junifer/preprocess/base.py,sha256=hARO4Yq9sQ8m2tATeuBmPMbI4BSnwNxLf2prF8Iq_Tk,66
280
280
  junifer/preprocess/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
281
281
  junifer/preprocess/confounds/__init__.py,sha256=L3CquKcndFb2b8yVo-XLi-zsNCe8MMKUN41UOVdooWc,270
282
282
  junifer/preprocess/confounds/__init__.pyi,sha256=iC70cqcWNMX4JM42RcUgKb9YX8ciK8oVERdWWjo-13c,102
283
- junifer/preprocess/confounds/fmriprep_confound_remover.py,sha256=FXnNZrr1GUBqiSOboRrM-TqO9rNxne63wlUMPfnPE78,20368
283
+ junifer/preprocess/confounds/fmriprep_confound_remover.py,sha256=Vw0ymmA8QppKY3GHdP8J9K6KyYUSbLGbBnwT-VpwXLw,21527
284
284
  junifer/preprocess/confounds/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
285
285
  junifer/preprocess/confounds/tests/test_fmriprep_confound_remover.py,sha256=yZxCud9l8bW36Rsk63Fi1qWUpM9L4Wtd2-zZW-DjvZA,19949
286
286
  junifer/preprocess/smoothing/__init__.py,sha256=7aTwvAG522kA76QQwqxwY5zV_6asyPaaH2uSMTaKQls,216
287
287
  junifer/preprocess/smoothing/__init__.pyi,sha256=5sjw61Eyon9gE_SWoktND9raw6IkgqcT2rtGNhVV9EA,58
288
- junifer/preprocess/smoothing/_afni_smoothing.py,sha256=x5Dtv8z6NCXxWumOIAnW17YRswHsD31V_7hhBGIizss,3287
289
- junifer/preprocess/smoothing/_fsl_smoothing.py,sha256=Zra5dS3k8qm823GtbW4uQWkGdNEeu0scY5OP4PteI88,3045
290
- junifer/preprocess/smoothing/_nilearn_smoothing.py,sha256=1maeg6t_kWuxK98IFFAmW0MNwii6YSFkXPJHjZUjOEo,1965
288
+ junifer/preprocess/smoothing/_afni_smoothing.py,sha256=4mdZk9YkA02wZ8rS6sbLnXL_7SIX7M0NwHPLckJgCmI,3325
289
+ junifer/preprocess/smoothing/_fsl_smoothing.py,sha256=vIj1sUjysujjPErZH2T5G1GrcaZyAkuvzERBgx4SmDU,2856
290
+ junifer/preprocess/smoothing/_nilearn_smoothing.py,sha256=bWljIiKX0dfIQmRo33Z-6WrCz05nMVAAroYaBsj2B1Q,2685
291
291
  junifer/preprocess/smoothing/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
292
- junifer/preprocess/smoothing/smoothing.py,sha256=I9NTnfnK84_rDCe7ycLZmWkSmKwYBlAfOPhFRSRxxfI,5366
292
+ junifer/preprocess/smoothing/smoothing.py,sha256=wdOnPi8XkEqzOQdUNJ0yOm_uWi3H4DnTQhOL8z7dZDs,5281
293
293
  junifer/preprocess/smoothing/tests/test_smoothing.py,sha256=t1j3zEvJk5XLO4fzcb-wQyBMH-xuvR1k6WYm8zriwik,2390
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=BHfweLDtq3J8NmgUFvA7bfWIN4kDvo0RiB1fNDJ71qw,6502
298
- junifer/preprocess/warping/_fsl_warper.py,sha256=yilHysV9t9bkBDK_eQzjROzlwhXStVzflCaEkxkwjlY,3798
297
+ junifer/preprocess/warping/_ants_warper.py,sha256=Qk6piCuGPlfgGbH3zMVC5UHCoQ7iddYuc2vgsrqncGg,10163
298
+ junifer/preprocess/warping/_fsl_warper.py,sha256=dH1xd3jTRPREzgdh98Dz_4o2gwdrOgc0h5wbARSSB98,5226
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.dev311.dist-info/AUTHORS.rst,sha256=rmULKpchpSol4ExWFdm-qu4fkpSZPYqIESVJBZtGb6E,163
345
- junifer-0.0.6.dev311.dist-info/LICENSE.md,sha256=MqCnOBu8uXsEOzRZWh9EBVfVz-kE9NkXcLCrtGXo2yU,34354
346
- junifer-0.0.6.dev311.dist-info/METADATA,sha256=A3vcsrgSmtY_rzNE4oPkyed8tfX0qw2Iy93uo03avn0,8429
347
- junifer-0.0.6.dev311.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
348
- junifer-0.0.6.dev311.dist-info/entry_points.txt,sha256=6O8ru0BP-SP7YMUZiizFNoaZ2HvJpadO2G7nKk4PwjI,48
349
- junifer-0.0.6.dev311.dist-info/top_level.txt,sha256=4bAq1R2QFQ4b3hohjys2JBvxrl0GKk5LNFzYvz9VGcA,8
350
- junifer-0.0.6.dev311.dist-info/RECORD,,
344
+ junifer-0.0.6.dev324.dist-info/AUTHORS.rst,sha256=rmULKpchpSol4ExWFdm-qu4fkpSZPYqIESVJBZtGb6E,163
345
+ junifer-0.0.6.dev324.dist-info/LICENSE.md,sha256=MqCnOBu8uXsEOzRZWh9EBVfVz-kE9NkXcLCrtGXo2yU,34354
346
+ junifer-0.0.6.dev324.dist-info/METADATA,sha256=a_1zgab7_sp4jn5_jM6ZrKnJXL1InFZpK9zj39EUtVY,8429
347
+ junifer-0.0.6.dev324.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
348
+ junifer-0.0.6.dev324.dist-info/entry_points.txt,sha256=6O8ru0BP-SP7YMUZiizFNoaZ2HvJpadO2G7nKk4PwjI,48
349
+ junifer-0.0.6.dev324.dist-info/top_level.txt,sha256=4bAq1R2QFQ4b3hohjys2JBvxrl0GKk5LNFzYvz9VGcA,8
350
+ junifer-0.0.6.dev324.dist-info/RECORD,,