questions > dcm2niix: issues with Siemens derived images
Showing 1-6 of 6 posts
Dec 18, 2020 02:12 PM | Matthew Sherwood - Wright State University
dcm2niix: issues with Siemens derived images
I recently moved to some data collected from a Siemens Verio. When
I run dcm2niix with the folder containing the dicom images for a
single subject/session, I get a "*** buffer overflow detected ***
dcm2niix terminated" error. When I ignore derived images (using -i
y flag) there error goes away but I am losing some important ASL
and DTI derived images. Everything runs fine when I use dcm2niigui,
which I assume is using dcm2nii not dcm2niix. I am on linux Ubuntu
18.04 with the latest version v1.0.20201102.
Dec 18, 2020 09:12 PM | Chris Rorden
RE: dcm2niix: issues with Siemens derived images
It sounds like issue 454 - you are running a pretty old operating system and it could be the
old compiler had bugs at high optimization levels. Why don't you
try reducing the optimization from -O3 to -O1
git clone --branch development https://github.com/rordenlab/dcm2niix.gi...
cd dcm2niix/console
g++ -O1 -g -fsanitize=address -fno-omit-frame-pointer -I. main_console.cpp nii_foreign.cpp nii_dicom.cpp jpg_0XC3.cpp ujpeg.cpp nifti1_io_core.cpp nii_ortho.cpp nii_dicom_batch.cpp -o dcm2niix -DmyDisableOpenJPEG
./dcm2niix -i y /path/to/DICOMs
git clone --branch development https://github.com/rordenlab/dcm2niix.gi...
cd dcm2niix/console
g++ -O1 -g -fsanitize=address -fno-omit-frame-pointer -I. main_console.cpp nii_foreign.cpp nii_dicom.cpp jpg_0XC3.cpp ujpeg.cpp nifti1_io_core.cpp nii_ortho.cpp nii_dicom_batch.cpp -o dcm2niix -DmyDisableOpenJPEG
./dcm2niix -i y /path/to/DICOMs
Dec 21, 2020 07:12 PM | Matthew Sherwood - Wright State University
RE: dcm2niix: issues with Siemens derived images
Chris,
Thanks for the quick reply. I made the adjustments via command line as you suggested but I am now receiving the buffer overflow using the "-i y" to ignore derived images, which before I was only getting when not ignoring derived images.
Originally:
dcm2niix /path/to/DICOMs -> did not work, buffer overflow
dcm2niix -i y /path/to/DICOMs -> works but missing derived images such as FA associated with DTI
dcm2niigui -> produces all derived images
New following your steps:
./dcm2niix -i y /path/to/DICOMS -> buffer overflow error
_matt
Thanks for the quick reply. I made the adjustments via command line as you suggested but I am now receiving the buffer overflow using the "-i y" to ignore derived images, which before I was only getting when not ignoring derived images.
Originally:
dcm2niix /path/to/DICOMs -> did not work, buffer overflow
dcm2niix -i y /path/to/DICOMs -> works but missing derived images such as FA associated with DTI
dcm2niigui -> produces all derived images
New following your steps:
./dcm2niix -i y /path/to/DICOMS -> buffer overflow error
_matt
Dec 22, 2020 03:12 PM | Chris Rorden
RE: dcm2niix: issues with Siemens derived images
If you built with sanitize, it should provide diagnostics with the
buffer overflow, e.g.
=================================================================
==99096==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000101938fe0 at pc 0x00010169d0b8 bp 0x00016f1f2240 sp 0x00016f1f2238
READ of size 1 at 0x000101938fe0 thread T0
#0 0x10169d0b4 in f_s fmt.c:98
#1 0x10169e358 in pars_f fmt.c:342
#2 0x10169fc9c in c_si iio.c:53
#3 0x1016a0220 in s_rsfi iio.c:85
#4 0x100c14380 in get_token__ parser.c:1113
#5 0x100c12f04 in parser_ parser.c:215
#6 0x100c25608 in PARSER_generate_code parser_int.c:59
This information is what is used to understand your problem.
=================================================================
==99096==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000101938fe0 at pc 0x00010169d0b8 bp 0x00016f1f2240 sp 0x00016f1f2238
READ of size 1 at 0x000101938fe0 thread T0
#0 0x10169d0b4 in f_s fmt.c:98
#1 0x10169e358 in pars_f fmt.c:342
#2 0x10169fc9c in c_si iio.c:53
#3 0x1016a0220 in s_rsfi iio.c:85
#4 0x100c14380 in get_token__ parser.c:1113
#5 0x100c12f04 in parser_ parser.c:215
#6 0x100c25608 in PARSER_generate_code parser_int.c:59
This information is what is used to understand your problem.
Dec 22, 2020 03:12 PM | Matthew Sherwood - Wright State University
RE: dcm2niix: issues with Siemens derived images
Unfortunately, I am not seeing any of this after running dcm2niix
from the git build code you gave:
Slices not stacked: dimensions vary across slices
Ignoring derived image(s) of series 7 /mnt/ss_rhb1/s3-mri-general/AFRL-Single_Exposure/raw_data/AE207_01/AE20701_1.MR.0007.0003.2018.04.04.16.57.38.341537.669208390.IMA
Slices not stacked: orientation varies (vNav or localizer?) [0.999111 0.0366578 -0.0208352 -0.0208212 -0.00076392 -0.999783] != [0.999111 0.0366578 -0.0208352 -0.0366658 0.999328 1.78683e-08]
Ignoring derived image(s) of series 7 /mnt/ss_rhb1/s3-mri-general/AFRL-Single_Exposure/raw_data/AE207_01/AE20701_1.MR.0007.0002.2018.04.04.16.57.38.341537.668942929.IMA
Ignoring derived image(s) of series 7 /mnt/ss_rhb1/s3-mri-general/AFRL-Single_Exposure/raw_data/AE207_01/AE20701_1.MR.0007.0004.2018.04.04.16.57.38.341537.669208424.IMA
Ignoring derived image(s) of series 7 /mnt/ss_rhb1/s3-mri-general/AFRL-Single_Exposure/raw_data/AE207_01/AE20701_1.MR.0007.0001.2018.04.04.16.57.38.341537.669205807.IMA
Ignoring localizer (sequence '*fl2d1') of series 2 /mnt/ss_rhb1/s3-mri-general/AFRL-Single_Exposure/raw_data/AE207_01/AE20701_1.MR.0002.0001.2018.04.04.16.57.38.341537.135667123.IMA
Ignoring localizer (sequence '*fl2d1') of series 2 /mnt/ss_rhb1/s3-mri-general/AFRL-Single_Exposure/raw_data/AE207_01/AE20701_1.MR.0002.0004.2018.04.04.16.57.38.341537.135667349.IMA
Ignoring localizer (sequence '*fl2d1') of series 2 /mnt/ss_rhb1/s3-mri-general/AFRL-Single_Exposure/raw_data/AE207_01/AE20701_1.MR.0002.0007.2018.04.04.16.57.38.341537.135667189.IMA
*** buffer overflow detected ***: /home/ubuntu/Downloads/dcm2niix/console/dcm2niix terminated
Aborted (core dumped)
Sending a link to the data in email.
Slices not stacked: dimensions vary across slices
Ignoring derived image(s) of series 7 /mnt/ss_rhb1/s3-mri-general/AFRL-Single_Exposure/raw_data/AE207_01/AE20701_1.MR.0007.0003.2018.04.04.16.57.38.341537.669208390.IMA
Slices not stacked: orientation varies (vNav or localizer?) [0.999111 0.0366578 -0.0208352 -0.0208212 -0.00076392 -0.999783] != [0.999111 0.0366578 -0.0208352 -0.0366658 0.999328 1.78683e-08]
Ignoring derived image(s) of series 7 /mnt/ss_rhb1/s3-mri-general/AFRL-Single_Exposure/raw_data/AE207_01/AE20701_1.MR.0007.0002.2018.04.04.16.57.38.341537.668942929.IMA
Ignoring derived image(s) of series 7 /mnt/ss_rhb1/s3-mri-general/AFRL-Single_Exposure/raw_data/AE207_01/AE20701_1.MR.0007.0004.2018.04.04.16.57.38.341537.669208424.IMA
Ignoring derived image(s) of series 7 /mnt/ss_rhb1/s3-mri-general/AFRL-Single_Exposure/raw_data/AE207_01/AE20701_1.MR.0007.0001.2018.04.04.16.57.38.341537.669205807.IMA
Ignoring localizer (sequence '*fl2d1') of series 2 /mnt/ss_rhb1/s3-mri-general/AFRL-Single_Exposure/raw_data/AE207_01/AE20701_1.MR.0002.0001.2018.04.04.16.57.38.341537.135667123.IMA
Ignoring localizer (sequence '*fl2d1') of series 2 /mnt/ss_rhb1/s3-mri-general/AFRL-Single_Exposure/raw_data/AE207_01/AE20701_1.MR.0002.0004.2018.04.04.16.57.38.341537.135667349.IMA
Ignoring localizer (sequence '*fl2d1') of series 2 /mnt/ss_rhb1/s3-mri-general/AFRL-Single_Exposure/raw_data/AE207_01/AE20701_1.MR.0002.0007.2018.04.04.16.57.38.341537.135667189.IMA
*** buffer overflow detected ***: /home/ubuntu/Downloads/dcm2niix/console/dcm2niix terminated
Aborted (core dumped)
Sending a link to the data in email.
Dec 23, 2020 02:12 PM | Chris Rorden
RE: dcm2niix: issues with Siemens derived images
I have replicated this and generated a Github issue (466).