brainlife / app-dwi2t1-nonlinear

App for running mrtrix3 dwipreproc and then performing nonlinear registration of dwi to T1 (by running ANTs affine+nonlinear registration of CSF masks of mean b0 and T1). Bvectors are rotated with the affine transform. App is recommended for bringing dwi to T1 space if no phase encoding contrast between b=0 images was collected (so mrtrix3 dwipreproc cannot perform inhomogeneity field estimation).
0 stars 1 forks source link

Failed to allocate memory for image. #2

Open soichih opened 3 years ago

soichih commented 3 years ago

I just ran a test job and it failed with this error message.

dwi2mask: applying mask cleaning filter...   done
mrconvert: [WARNING] requested datatype (Bit) not supported - substituting with UInt8
mrconvert: copying from "dwi_mask.mif" to "dwi_mask.nii.gz"...  [===============================]
mrconvert: compressing image "dwi_mask.nii.gz"...  [=]
mrconvert: copying from "dwi_corrected.mif" to "dwi_corrected.nii.gz"...  [==================================================]
mrconvert: compressing image "dwi_corrected.nii.gz"...  [==================================================]
dwiextract: extracting volumes...  [==================================================]
mrcalc: computing: max (/tmp/mrtrix-tmp-27CNlT.mif, 0)...  [==================================================]
mrmath: preloading data for "/tmp/mrtrix-tmp-tybkXJ.mif"...  [==================================================]
mrmath: computing mean along axis 3......  [==================================================]
mrconvert: copying from "dwi_meanbzero.mif" to "dwi_meanbzero.nii.gz"...  [===============================]
mrconvert: compressing image "dwi_meanbzero.nii.gz"...  [==]
terminate called after throwing an instance of 'itk::MemoryAllocationError'
  what():  /tmp/ANTs/build/ITKv4-install/include/ITK-4.11/itkImportImageContainer.hxx:199:
Failed to allocate memory for image.
./dwi2t1.sh: line 92: 19706 Aborted                 antsApplyTransforms -e $dim -i dwi_corrected.nii.gz -r $f -t ${nm}0GenericAffine.mat -t ${nm}1Warp.nii.gz -o $outdir/dwi.nii.gz

Nothing too crazy with memory usage, so I don't know what could be causing this error message.

image

Maybe we should just deprecate this app with https://brainlife.io/app/5e6a8ebd8740673152a3d18f ?

kathrynalpert commented 3 years ago

This app is part of a high resolution structural connectome pipeline used at NU. It requires a preprocessed DWI input (likely the source of your issue).

You can deprecate it if you wish (I am not able to support it any longer). Its purpose is to align T1 and DWI in the absence of phase encoding contrast between b0 images. It performs the nonlinear registration between CSF masks of mean b0 and T1 images, then applies this transform to the DWI data, and while it is generally preferable to leave the DWI data alone, instead bringing the T1 into the DWI space via rigid registration, some believe it’s only appropriate to do so if you have phase encoding contrast between b0 images.

On Tue, Dec 8, 2020 at 1:10 PM Soichi Hayashi notifications@github.com wrote:

I just ran a test job and it failed with this error message.

dwi2mask: applying mask cleaning filter... done mrconvert: [WARNING] requested datatype (Bit) not supported - substituting with UInt8 mrconvert: copying from "dwi_mask.mif" to "dwi_mask.nii.gz"... [===============================] mrconvert: compressing image "dwi_mask.nii.gz"... [=] mrconvert: copying from "dwi_corrected.mif" to "dwi_corrected.nii.gz"... [==================================================] mrconvert: compressing image "dwi_corrected.nii.gz"... [==================================================] dwiextract: extracting volumes... [==================================================] mrcalc: computing: max (/tmp/mrtrix-tmp-27CNlT.mif, 0)... [==================================================] mrmath: preloading data for "/tmp/mrtrix-tmp-tybkXJ.mif"... [==================================================] mrmath: computing mean along axis 3...... [==================================================] mrconvert: copying from "dwi_meanbzero.mif" to "dwi_meanbzero.nii.gz"... [===============================] mrconvert: compressing image "dwi_meanbzero.nii.gz"... [==] terminate called after throwing an instance of 'itk::MemoryAllocationError' what(): /tmp/ANTs/build/ITKv4-install/include/ITK-4.11/itkImportImageContainer.hxx:199: Failed to allocate memory for image. ./dwi2t1.sh: line 92: 19706 Aborted antsApplyTransforms -e $dim -i dwi_corrected.nii.gz -r $f -t ${nm}0GenericAffine.mat -t ${nm}1Warp.nii.gz -o $outdir/dwi.nii.gz

Nothing too crazy with memory usage, so I don't know what could be causing this error message.

[image: image] https://user-images.githubusercontent.com/923896/101535961-5c6d1700-3967-11eb-8aed-3e5bfc4045df.png

Maybe we should just deprecate this app with https://brainlife.io/app/5e6a8ebd8740673152a3d18f ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/brainlife/app-dwi2t1-nonlinear/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACMSEOXRHLGJ2HGS3YBSKLST2B2ZANCNFSM4USO6WMQ .