questions > RE: Option to convert only single series does not work
Sep 4, 2025  11:09 AM | Chris Rorden
RE: Option to convert only single series does not work

The -n option is an advanced feature that is used by MRIcroGL and FSLeyes to provide a user with a list of all of the DICOMs in a folder and allow them to select just one to load. Since a folder might have many repeats of a particular series, you need to know how dcm2niix encodes the details as a CRC code. Therefore, to use the -n option you run it twice, once with the value -1 to list CRCs and their corresponding series, and subsequently with the CRC of the series you wish to convert. To provide a concrete example with Siemens XA60, consider the validation dataset dcm_qa_xa60 where we only want to convert the series that used the CMRR research sequences and with iPAT=3 and multi-band = 1. We first query the folder to identify the CRC (which turns out to be 257128538) and then convert just that series:



$ dcm2niix -n -1 ./dcm_qa_xa60

Chris Rorden's dcm2niiX version v1.0.20250626  Clang17.0.0 ARM (64-bit MacOS)

257128538 ./dcm_qa_xa60/dcm_qa_xa60_C2P_cmrr_mbep2d_bold_p3_mb1_20241004141746_8

 ./dcm_qa_xa60/In/XA60/DICOM/24100413/39280000/75739574

 ..

  3832686387 ./dcm_qa_xa60/dcm_qa_xa60_C2P_cmrr_mbep2d_bold_p2_mb5_20241003104115_12

 ./dcm_qa_xa60/In/XA61/DICOM/24100310/14440000/88972664

$ dcm2niix -n 257128538 ./dcm_qa_xa60

Chris Rorden's dcm2niiX version v1.0.20250626  Clang17.0.0 ARM (64-bit MacOS)

Convert 3 DICOM as ./dcm_qa_xa60/dcm_qa_xa60_C2P_cmrr_mbep2d_bold_p3_mb1_20241004141746_8 (64x64x10x3)

Conversion required 0.269020 seconds (0.268941 for core code).

Note that when you query dcm2niix, it reports the following details for each series: CRC; filename; (image_dimensions). You can use the `-f` option to choose what details should be shown in the filename, which can help you parse what image you will convert, for example `-f %t_%s_%p` will provide the datetime_seriesNumber_protocolName.

 

 

Threaded View

TitleAuthorDate
Christian Paret Sep 4, 2025
RE: Option to convert only single series does not work
Chris Rorden Sep 4, 2025