AFQ.nn.utils#

Functions#

crop_to_nonzero(img)

Crops the image to the bounding box of non-zero voxels.

prepare_t1_for_nn(t1_img[, orientation, out_shape_dynamic])

resample_output(output, conformed_affine, t1_img)

merge_PVEs(PVE_a, PVE_b)

Merge two PVE (Partial Volume Estimation) images, PVE_a and PVE_b,

Module Contents#

AFQ.nn.utils.crop_to_nonzero(img)[source]#

Crops the image to the bounding box of non-zero voxels.

AFQ.nn.utils.prepare_t1_for_nn(t1_img, orientation='RAS', out_shape_dynamic=False)[source]#
AFQ.nn.utils.resample_output(output, conformed_affine, t1_img)[source]#
AFQ.nn.utils.merge_PVEs(PVE_a, PVE_b)[source]#

Merge two PVE (Partial Volume Estimation) images, PVE_a and PVE_b, into a single PVE image. The merging is done by taking the maximum WM estimate from both images, then the maximum GM estimate, and finally normalizing.