Hello AFNIites,
I am having a problem with to3d when reading one large volume of dicom data.
The command I used was created by Dimon for 992 slices:
to3d -prefix ctpre -ushort2float -@ < dimon.files.run.020
and the error message is shown at the very end to keep it separate from the rest of this saga.
I did get around the problem by splitiing the images into three chunks:
sed -n 1,450p dimon.files.run.020 | to3d -prefix ctpre001 -ushort2float -@
sed -n 451,900p dimon.files.run.020 | to3d -prefix ctpre451 -ushort2float -@
sed -n 901,992p dimon.files.run.020 | to3d -prefix ctpre901 -ushort2float -@
then combined them with:
3dZcat -datum float -prefix ctpreflzcat ctpre???+orig.HEAD
which produced a 3.9 GB float dataset as expected.
It seems that the problem is related to memory usage in to3d, rather than limitations of the machine I am using which has 32GB of ram. Any suggestions for getting around this problem are appreciated.
Sincerely,
ZXu
The error message from to3d command:
% to3d -prefix ctpre -ushort2float -@ < dimon.files.run.020
++ to3d: AFNI version=AFNI_2011_12_21_1014 (Aug 27 2015) [64-bit]
++ Authored by: RW Cox
++ It is best to use to3d via the Dimon program.
++ Counting images: total=992 2D slices
++ DICOM WARNING: file 1.2.826.0.1.3417726.3.924183.20150915113157609.dcm has Rescale tags
setenv AFNI_DICOM_RESCALE YES to enforce them
++ Data detected to be oblique
*+ WARNING: DICOM file 1.2.826.0.1.3417726.3.924183.20150915113157609.dcm:
--> unsigned 16-bit; AFNI stores as signed; 126355 pixels < 0
--> consider 'to3d -ushort2float', if not already being applied
++ Each 2D slice is 1024 X 1024 pixels
++ Voxel dimensions: 0.0873 X 0.0873 X 0.0873 mm
++ Reading images: ++ DICOM WARNING: file 1.2.826.0.1.3417726.3.394563.20150915113157687.dcm has Rescale tags
setenv AFNI_DICOM_RESCALE YES to enforce them
++ DICOM WARNING: no more Rescale tags messages will be printed
.....................
Fatal Signal 11 (SIGSEGV) received
mri_read_file
T3D_read_images
to3d:main
Bottom of Debug Stack
** AFNI version = AFNI_2011_12_21_1014 Compile date = Aug 27 2015
** [[Precompiled binary macosx_10.7_Intel_64: Aug 27 2015]]
** Program Death **
** If you report this crash to the AFNI message board,
** please copy the error messages EXACTLY, and give
** the command line you used to run the program, and
** any other information needed to repeat the problem.
** You may later be asked to upload data to help debug.
** Crash log is appended to file /Users/zsaad/.afni.crashlog