gen_3d_img_from_timeseries#

petpal.utils.dimension.gen_3d_img_from_timeseries(input_img: ants.ANTsImage) ants.ANTsImage#

Get the first frame of a 4D image as a template 3D image with voxel value zero.

A simplified version of ants.ndimage_to_list.ndimage_to_list().

Parameters:

input_img (ants.ANTsImage) – The 4D image from which to get the template image.

Returns:

img_3d (ants.ANTsImage) – The 3D template of the input image as an ants image.