Package: ants
Version: 1.9+svn532-2
Severity: normal

I tried warping a timeseries image with a warpfield and two consecutive
affine transformations, but it fails because the process requires a huge
amount of memory, probably due to a leak. This is the timeseries images:

m...@head1 /tmp % fslinfo bold.nii.gz
data_type      FLOAT32
dim1           64
dim2           64
dim3           48
dim4           1101
datatype       16
pixdim1        3.0000000000
pixdim2        3.0000000000
pixdim3        3.0000000000
pixdim4        3.0000000000
cal_max        1462.2584
cal_min        0.0000
file_type      NIFTI-1+

and here the reference image:

m...@head1 /tmp % fslinfo MNI.nii.gz
data_type      INT16
dim1           64
dim2           73
dim3           64
dim4           1
datatype       4
pixdim1        3.0000000000
pixdim2        3.0000000000
pixdim3        3.0000000000
pixdim4        1.0000000000
cal_max        0.0000
cal_min        0.0000
file_type      NIFTI-1+

I tried to run something like this:

  WarpTimeSeriesImageMultiTransform 4 bold.nii.gz warped4.nii.gz -R MNI.nii.gz 
myWarp.nii.gz myAffine.txt otherAffine.txt

The process seems to run fine (usual output). However, after about 20%
completion (about 20min time) it already consumes more than 20GB and
that consumption grows steadily. I assume it processes the image volume
by volume and there is a memory leak somewhere. The process eventually
dies when it exceeds the machines memory (64GB!).

I tried to trim the problem down to be able to debug it and made an
image with only the first two volumes of bold.nii.gz. However, running
the above command with this image points to another problem:

m...@head1 /tmp % WarpTimeSeriesImageMultiTransform 4 example4d.nii.gz 
warped4d.nii.gz -R MNI.nii.gz myWarp.nii.gz myAffine.txt otherAffine.txt
FIELD: myWarp.nii.gz
AFFINE: myAffine.txt
AFFINE: otherAffine.txt
moving_image_filename: example4d.nii.gz
output_image_filename: warped4d.nii.gz
reference_image_filename: MNI.nii.gz
[0/3]: FIELD: myWarp.nii.gz
[1/3]: AFFINE: myAffine.txt
[2/3]: AFFINE: otherAffine.txt
 Four-D image size: [64, 64, 48, 2]
 4D-In-Spc [3, 3, 3, 3]
 4D-In-Org [-66.1627, -88.7711, 84.4337, 0]
 4D-In-Size [64, 64, 48, 2]
 4D-In-Dir -0 0 1 0
1 -0 0 0
0 -1 -0 0
0 0 0 1

 ...... 
 4D-Out-Spc [3, 3, 3, 3]
 4D-Out-Org [-90, 126, -72, 0]
 4D-Out-Size [64, 73, 64, 2]
 4D-Out-Dir 1 0 0 0
0 -1 0 0
0 0 1 0
0 0 0 1

E: Child terminated by signal ‘Floating point exception’

(+ core dump)


Finally, to see whether there is a problem with the volumes, the
warpfield or the affines I ran this command on an image with only the
first volume of bold.nii.gz:

  WarpImageMultiTransform 3 example3d.nii.gz warped3d.nii.gz -R MNI.nii.gz 
myWarp.nii.gz myAffine.txt otherAffine.txt

and it behaves exactly like it should and yields the results I wanted to
see. So I guess the transformations and input images are fine and the
problem lies somewhere in WarpTimeSeriesImageMultiTransform.


Thanks in advance,

Michael



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to