Skip to content

Commit

Permalink
Add ASL support (#839)
Browse files Browse the repository at this point in the history
* Add "asl" to list of non-standard spaces.

* Add "asl" to data collection.

* Add ASL-related filename patterns to config.

* Drop m0scan from fmap pattern.
  • Loading branch information
tsalo authored Nov 30, 2023
1 parent a5a85a3 commit 16609f2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion niworkflows/data/nipreps.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
},
{
"name": "datatype",
"pattern": "[/\\\\]+(func|anat|fmap|dwi|meg|eeg|figures)[/\\\\]+"
"pattern": "[/\\\\]+(func|anat|fmap|dwi|meg|eeg|perf|figures)[/\\\\]+"
},
{
"name": "extension",
Expand Down Expand Up @@ -172,6 +172,10 @@
"sub-{subject}[/ses-{session}]/{datatype<dwi>|dwi}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_rec-{reconstruction}][_dir-{direction}][_run-{run}][_space-{space}][_cohort-{cohort}][_res-{resolution}]_desc-{desc}_{suffix<mask>}{extension<.json|.nii.gz|.nii>|.nii.gz}",
"sub-{subject}[/ses-{session}]/{datatype<dwi>|dwi}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_rec-{reconstruction}][_dir-{direction}][_run-{run}][_space-{space}][_cohort-{cohort}][_res-{resolution}][_desc-{desc}]_{suffix<dwi>}{extension<.tsv|.bval|.bvec|.b>|.tsv}",
"sub-{subject}[/ses-{session}]/{datatype<dwi>|dwi}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_rec-{reconstruction}][_dir-{direction}][_run-{run}]_from-{from}_to-{to}_mode-{mode<image|points>|image}[_desc-{desc}]_{suffix<xfm>|xfm}{extension<.txt|.h5>}",
"sub-{subject}[/ses-{session}]/{datatype<perf>|perf}/sub-{subject}[_ses-{session}][_task-{task}][_acq-{acquisition}][_rec-{reconstruction}][_dir-{direction}][_run-{run}]_{suffix<aslcontext>}{extension<.tsv|.json>|.tsv}",
"sub-{subject}[/ses-{session}]/{datatype<perf>|perf}/sub-{subject}[_ses-{session}][_task-{task}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_dir-{direction}][_run-{run}]_from-{from}_to-{to}_mode-{mode<image|points>|image}_{suffix<xfm>|xfm}{extension<.txt|.h5>}",
"sub-{subject}[/ses-{session}]/{datatype<perf>|perf}/sub-{subject}[_ses-{session}][_task-{task}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_dir-{direction}][_run-{run}][_space-{space}][_atlas-{atlas}][_cohort-{cohort}][_desc-{desc}]_{suffix<timeseries>}{extension<.json|.tsv>|.tsv}",
"sub-{subject}[/ses-{session}]/{datatype<perf>|perf}/sub-{subject}[_ses-{session}][_task-{task}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_dir-{direction}][_run-{run}][_space-{space}][_atlas-{atlas}][_cohort-{cohort}][_desc-{desc}]_{suffix<asl|aslref|att|cbf|coverage|mask>}{extension<.nii|.nii.gz|.json|.tsv>|.tsv}",
"sub-{subject}[/ses-{session}]/{datatype<fmap>|fmap}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_dir-{direction}][_run-{run}][_part-{part}][_space-{space}][_cohort-{cohort}][_res-{resolution}][_fmapid-{fmapid}][_desc-{desc}]_{suffix<fieldmap>}{extension<.nii|.nii.gz|.json>|.nii.gz}",
"sub-{subject}/{datatype<figures>}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}][_space-{space}][_cohort-{cohort}][_desc-{desc}]_{suffix<T1w|T2w|T1rho|T1map|T2map|T2star|FLAIR|FLASH|PDmap|PD|PDT2|inplaneT[12]|angio|dseg|mask|T2starw|MTw|TSE>}{extension<.html|.svg>|.svg}",
"sub-{subject}/{datatype<figures>}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}][_space-{space}][_cohort-{cohort}][_fmapid-{fmapid}][_desc-{desc}]_{suffix<fieldmap>}{extension<.html|.svg>|.svg}",
Expand Down
3 changes: 2 additions & 1 deletion niworkflows/interfaces/bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ class _BIDSDataGrabberOutputSpec(TraitedSpec):
flair = OutputMultiObject(desc="output FLAIR images")
pet = OutputMultiObject(desc="output PET images")
dwi = OutputMultiObject(desc="output DWI images")
asl = OutputMultiObject(desc="output ASL images")


class BIDSDataGrabber(SimpleInterface):
Expand Down Expand Up @@ -278,7 +279,7 @@ def _run_interface(self, runtime):
)
)

for imtype in ["bold", "t2w", "flair", "fmap", "sbref", "roi", "pet"]:
for imtype in ["bold", "t2w", "flair", "fmap", "sbref", "roi", "pet", "asl"]:
if not bids_dict[imtype]:
LOGGER.info(
'No "%s" images found for sub-%s', imtype, self.inputs.subject_id
Expand Down
1 change: 1 addition & 0 deletions niworkflows/utils/bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"sbref": {"datatype": "func", "suffix": "sbref", "part": ["mag", None]},
"t1w": {"datatype": "anat", "suffix": "T1w", "part": ["mag", None]},
"t2w": {"datatype": "anat", "suffix": "T2w", "part": ["mag", None]},
"asl": {"datatype": "perf", "suffix": "asl"},
}


Expand Down
1 change: 1 addition & 0 deletions niworkflows/utils/spaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"session",
"individual",
"dwi",
"asl",
]
"""List of supported nonstandard reference spaces."""

Expand Down

0 comments on commit 16609f2

Please sign in to comment.