Closed novafae closed 1 year ago
The default spline spacing is for human brains, much too large for an animal image. This leads to the image being enlarged to fit the spline, using up all the memory.
To fix, add a reasonable spline spacing for your image, something like spline_param = 20
, to the N4 call.
@ntustison what do you think about making the default spline spacing the the largest side of the image bounding box? So in this case (dims = 256x224x320) it would default to 320 * 0.05
Yeah, I didn't set the default here in ANTsPy. Very much along your suggestion, I would just default to what we do in ANTs which is a single mesh element.
Oh yes, that would be better. Thanks
Thank you! adding spline_param = 20
worked.
The default spline spacing is for human brains, much too large for an animal image. This leads to the image being enlarged to fit the spline, using up all the memory.
To fix, add a reasonable spline spacing for your image, something like
spline_param = 20
, to the N4 call.
I'm trying to run ants.n4_bias_field_correction. Using ANTsPy across multiple machines, I'm getting a "Failed to allocate memory for image." error. However, it works using the N4BiasFieldCorrection command with the same images via ANTs. I
I've included the scripts I use, and the input. I tried searching the GitHub, but couldn't find a solution.
Does anyone have any idea what's my issue is?
Input File: T_P14_MRI-T2_SymmetricStereotaxicTemplate_50um_Oriented.nii.gz