File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -74,14 +74,15 @@ def generate_bids_skeleton(target_path, bids_config):
74
74
75
75
for bids_file in files :
76
76
metadata = bids_file .pop ("metadata" , None )
77
+ extension = bids_file .pop ("extension" , ".nii.gz" )
77
78
suffix = bids_file .pop ("suffix" )
78
79
entities = combine_entities (** bids_file )
79
- nii_file = modality_path / f"{ bids_prefix } { entities } _{ suffix } .nii.gz "
80
- nii_file .touch ()
80
+ out_file = modality_path / f"{ bids_prefix } { entities } _{ suffix } { extension } "
81
+ out_file .touch ()
81
82
82
83
if metadata is not None :
83
- nii_metadata = nii_file .parent / nii_file .name .replace ("nii.gz" , "json" )
84
- to_json (nii_metadata , metadata )
84
+ out_metadata = out_file .parent / out_file .name .replace (extension , ". json" )
85
+ to_json (out_metadata , metadata )
85
86
86
87
return _bids_dict
87
88
You can’t perform that action at this time.
0 commit comments