From 3bc413f599235f018e6b6d7277854defc05466c9 Mon Sep 17 00:00:00 2001 From: Martin Norgaard Date: Mon, 28 Aug 2023 09:41:58 +0200 Subject: [PATCH 1/2] ENH: add PET support to niworkflows --- niworkflows/interfaces/bids.py | 1 + niworkflows/utils/bids.py | 1 + 2 files changed, 2 insertions(+) diff --git a/niworkflows/interfaces/bids.py b/niworkflows/interfaces/bids.py index fb8bf4dfe0f..55d5908cf8d 100644 --- a/niworkflows/interfaces/bids.py +++ b/niworkflows/interfaces/bids.py @@ -225,6 +225,7 @@ class _BIDSDataGrabberOutputSpec(TraitedSpec): roi = OutputMultiObject(desc="output ROI images") t2w = OutputMultiObject(desc="output T2w images") flair = OutputMultiObject(desc="output FLAIR images") + pet = OutputMultiObject(desc="output PET images") class BIDSDataGrabber(SimpleInterface): diff --git a/niworkflows/utils/bids.py b/niworkflows/utils/bids.py index 658cbbd2d6a..f83c7282414 100644 --- a/niworkflows/utils/bids.py +++ b/niworkflows/utils/bids.py @@ -233,6 +233,7 @@ def collect_data( "t2w": {"datatype": "anat", "suffix": "T2w", "part": ["mag", None]}, "t1w": {"datatype": "anat", "suffix": "T1w", "part": ["mag", None]}, "roi": {"datatype": "anat", "suffix": "roi"}, + "pet": {"suffix": "pet"} } bids_filters = bids_filters or {} for acq, entities in bids_filters.items(): From f688726158d0d4ea7637bf646532b41c54f85a12 Mon Sep 17 00:00:00 2001 From: Martin Norgaard Date: Mon, 28 Aug 2023 09:58:05 +0200 Subject: [PATCH 2/2] FIX: add pet to list of imtypes --- niworkflows/interfaces/bids.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/niworkflows/interfaces/bids.py b/niworkflows/interfaces/bids.py index 55d5908cf8d..972284cbe3f 100644 --- a/niworkflows/interfaces/bids.py +++ b/niworkflows/interfaces/bids.py @@ -277,7 +277,7 @@ def _run_interface(self, runtime): ) ) - for imtype in ["bold", "t2w", "flair", "fmap", "sbref", "roi"]: + for imtype in ["bold", "t2w", "flair", "fmap", "sbref", "roi", "pet"]: if not bids_dict[imtype]: LOGGER.info( 'No "%s" images found for sub-%s', imtype, self.inputs.subject_id