You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run dcm2niix using the following command:
dcm2niix -x y -z y -f ${bids_stnm}_${session_nb}_T1w -o ${bids_test_dir}/${session_nb}/anat ${file}
All of the flags work except -x. The resulting nifti file is neither cropped, nor re-oriented.
Expected behavior
I would expect a cropped and re-oriented nifti file.
Output log
Chris Rorden's dcm2niiX version v1.0.20240202 Clang16.0.6 ARM (64-bit MacOS)
Warning: dcm2niix PAR is not actively supported (hint: use dicm2nii)
Done reading PAR header version 4.2, with 200 slices
Philips Scaling Values RS:RI:SS = 1:0:0.00287659 (see PMC3998685)
Convert 1 DICOM as /Volumes/clippdata/CAP/bids_test/sub-001/ses-baseline/anat/sub-001_ses-baseline_T1w (256x256x200x1)
Conversion required 1.622296 seconds (0.766511 for core code).
created /Volumes/clippdata/CAP/bids_test/sub-001/ses-baseline/anat/sub-001_ses-baseline_T1w.nii.gz
Version
Please report the complete version string:
dcm2niiX version v1.0.20240202 Clang16.0.6 ARM (64-bit MacOS)
The text was updated successfully, but these errors were encountered:
dcm2niix will only crop and rotate acquisitions if it is confident that the image is a 3D acquisition. The reason for this is that 2D slice timing and bvec directions require us to retain the slice order. PAR/REC files are less verbose than DICOM files, and while your acquisition might be 3D, dcm2niix is not able to establish that.
dcm2niix is open source and has minimal dependencies, so you can make a fork and override any behavior you wish. The rotation is lossless, so any tool that applies the NIfTI orientation information will not see any difference between the orginal and reoriented result. The cropping is fairly crude and most modern tools should be robust for excess neck in MRI scans. I am a huge proponent of SynthStrip that can work with any modality, and provides far more sophisticated results - this will remove excess tissue and deface the image for anonymization (though if subsequent processing does intensity homogeneity bias correction you may want to choose a wide border setting).
Describe the bug
I am trying to run dcm2niix using the following command:
dcm2niix -x y -z y -f ${bids_stnm}_${session_nb}_T1w -o ${bids_test_dir}/${session_nb}/anat ${file}
All of the flags work except -x. The resulting nifti file is neither cropped, nor re-oriented.
Expected behavior
I would expect a cropped and re-oriented nifti file.
Output log
Chris Rorden's dcm2niiX version v1.0.20240202 Clang16.0.6 ARM (64-bit MacOS)
Warning: dcm2niix PAR is not actively supported (hint: use dicm2nii)
Done reading PAR header version 4.2, with 200 slices
Philips Scaling Values RS:RI:SS = 1:0:0.00287659 (see PMC3998685)
Convert 1 DICOM as /Volumes/clippdata/CAP/bids_test/sub-001/ses-baseline/anat/sub-001_ses-baseline_T1w (256x256x200x1)
Conversion required 1.622296 seconds (0.766511 for core code).
created /Volumes/clippdata/CAP/bids_test/sub-001/ses-baseline/anat/sub-001_ses-baseline_T1w.nii.gz
Version
Please report the complete version string:
dcm2niiX version v1.0.20240202 Clang16.0.6 ARM (64-bit MacOS)
The text was updated successfully, but these errors were encountered: