This came up because of slow performance in ants.resample_image for large images
Lots of copies of the big image happening
|
if image.components == 1: |
|
inimage = image.clone('float') |
|
outimage = image.clone('float') |
|
rsampar = 'x'.join([str(rp) for rp in resample_params]) |
|
|
|
args = [image.dimension, inimage, outimage, rsampar, int(use_voxels), interp_type] |
|
processed_args = process_arguments(args) |
|
libfn = get_lib_fn('ResampleImage') |
|
libfn(processed_args) |
|
outimage = outimage.clone(image.pixeltype) |
|
return outimage |
Originally posted by @cookpa in #810
Do all these clones need to happen? Would it be possible to initialize a dummy image and pass that pointer to libfn?
This came up because of slow performance in ants.resample_image for large images
Originally posted by @cookpa in #810
Do all these clones need to happen? Would it be possible to initialize a dummy image and pass that pointer to libfn?