Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filename custom option -f with %u, NOT working #526

Closed
jeodai opened this issue Jul 6, 2021 · 4 comments
Closed

Filename custom option -f with %u, NOT working #526

jeodai opened this issue Jul 6, 2021 · 4 comments

Comments

@jeodai
Copy link

jeodai commented Jul 6, 2021

As the title descriped, dcm2niix -f %f_%u ... not working, the result filename is missing acquisition number.

And there is a warning: "Warning: Ignoring '%u' in output filename (recompile to segment by acquisition)".

Anyone knows what happened? Thank you!

@neurolabusc
Copy link
Collaborator

This is as intended. As required by the BIDS specification, many modalities stack a range of acquisitions into a single 4D NIfTI file (e.g. fMRI/ASL time series, DTI gradient directions and b-values). Therefore, a single file contains multiple acquisition values (from DICOM tag 0020,0012). For a minimal example, consider this fMRI dataset where two timepoints are acquired: acquisition 1 and 2.

If you want to split a 4D NIfTI file into 3D files, consider a tool like fslsplit.

neurolabusc added a commit that referenced this issue Jul 6, 2021
@jeodai
Copy link
Author

jeodai commented Jul 7, 2021

This is as intended. As required by the BIDS specification, many modalities stack a range of acquisitions into a single 4D NIfTI file (e.g. fMRI/ASL time series, DTI gradient directions and b-values). Therefore, a single file contains multiple acquisition values (from DICOM tag 0020,0012). For a minimal example, consider this fMRI dataset where two timepoints are acquired: acquisition 1 and 2.

If you want to split a 4D NIfTI file into 3D files, consider a tool like fslsplit.

Thanks for your explanation, I see the consideration.
However I have two small problems:

My test dicom data has no multiple acquisition values, but it is still ignored.
If I want to config it to NOT ignore, do I have to compile the dcm2niix source by myself?

@neurolabusc
Copy link
Collaborator

The development branch of dcm2niix will now allow inserting the acquisition number in the filename, though it will generate the warning:

Warning: '%u' in output filename can be misleading (issue 526)

Be aware that this value will not be meaningful for NIfTI files that contain image data from DICOMs with varying acquisition number. While this behavior is now allowed, I would advise against using the -f %u for DICOM to NIfTI conversion, as it was designed for DICOM renaming.

@neurolabusc
Copy link
Collaborator

neurolabusc commented Jul 8, 2021

Sorry, added response meant for issue 524. Closing this issue as feature has been added to developmental build.

yarikoptic added a commit to neurodebian/dcm2niix that referenced this issue Sep 9, 2021
* commit 'v1.0.20200427-207-g66a4fd0': (76 commits)
  Philips ASL in temporal order (rordenlab#533)
  Optional compilation to disable kludge for issue 532, e.g. "make CFLAGS=-DmyDisableGEPEPolarFlip" (rordenlab#532)
  0020,9157 if dcuncat, use 0020,0013 if 0019,10A2; 0020,0100; 2005,1063; 2005,1413 do not vary (rordenlab#529)
  Add BIDS ArterialSpinLabelingType field
  Diagnostics for issue 529 (rordenlab#529)
  Flip row order for kGE_EPI_PEPOLAR_REV
  Detect and correct GE epi_pepolar sequence (rordenlab#532)
  More CT meta data, detect manufacturer MEDISO
  Philips ASL volume order (rordenlab#529)
  ensureSequentialSlicePositions verbosity
  Handle Philips images where 2005,1063 is set to zero for all volumes, see Magdeburg_2014 from dcm_qa_philips Philips MR 51.0
  @baxpr kludge (rordenlab#529)
  Remove redundancy
  Kludge for Philips random instance numbers (rordenlab#529)
  BUG: Fix preprocessor conflict.
  Support ancient Linux, tested on holy-build-box (rordenlab#531)
  undefine DT_NONE (https://neurostars.org/t/adjusting-for-negative-mosaicrefacqtimes-issue-271-warning-but-with-normal-slice-times/19866/3)
  UIH new TotalReadoutTIme formula (rordenlab#531)
  UIH uodates
  Allow acquisition number (0020,0012) in filename (rordenlab#526)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants