Skip to content

Commit

Permalink
Append dcm2niix postfix to acq only if acq is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominika Zemanovicova committed Dec 20, 2023
1 parent 495346b commit e48106b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bidscoin/plugins/dcm2niix2bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,10 @@ def bidscoiner_plugin(session: Path, bidsmap: dict, bidsses: Path) -> Union[None
newbidsname = newbidsname.replace('_magnitude_ph', '_fieldmap') # Case 3: One magnitude + one fieldmap image in one folder / datasource
newbidsname = newbidsname.replace('_fieldmap_ph', '_fieldmap') # Case 3

# Append the dcm2niix info to acq-label, may need to be improved / elaborated for future BIDS standards, supporting multi-coil data
# Append the dcm2niix info to acq-label if it is not defined, may need to be improved / elaborated for future BIDS standards, supporting multi-coil data
else:
newbidsname = bids.get_bidsvalue(newbidsname, 'dummy', postfix)
if not bids.get_bidsvalue(dcm2niixfile.name, 'acq'):
newbidsname = bids.get_bidsvalue(newbidsname, 'dummy', postfix)

# Remove the added postfix from the new bidsname
newbidsname = newbidsname.replace(f"_{postfix}_",'_') # If it is not last
Expand Down

0 comments on commit e48106b

Please sign in to comment.