From 27d7b708af50590c432239def6754ea9d163a1e0 Mon Sep 17 00:00:00 2001 From: Harsh Sinha Date: Fri, 23 Feb 2024 11:28:40 -0500 Subject: [PATCH] Modify is_bids_file to ignore JSON with .bidsignore --- MRdataset/dicom_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MRdataset/dicom_utils.py b/MRdataset/dicom_utils.py index abae5eb..6c64a30 100644 --- a/MRdataset/dicom_utils.py +++ b/MRdataset/dicom_utils.py @@ -29,7 +29,8 @@ def is_bids_file(filename: Union[str, Path]): # TODO: Add some criteria to skip certain files if 'derivatives' in str(filename): return False - + if 'bidsignore' in str(filename): + return False # Regular expression pattern pattern = r'sub-[^_]+' # Extracting substring using regex