pytomography.transforms.PET.psf#

Module Contents#

Classes#

PETPSFTransform

im2im transform used to model the effects of PSF blurring in PET. The smoothing kernel is assumed to be independent of \(\theta\) and \(z\), but is dependent on \(r\).

Functions#

kernel_noncol(x, r, R[, delta])

kernel_penetration(x, r, R[, mu, delta])

kernel_scattering(x, r, R[, scatter_fact, delta])

class pytomography.transforms.PET.psf.PETPSFTransform(kerns)[source]#

Bases: pytomography.transforms.Transform

im2im transform used to model the effects of PSF blurring in PET. The smoothing kernel is assumed to be independent of \(\theta\) and \(z\), but is dependent on \(r\).

Parameters:

kerns (Sequence[callable]) – A sequence of PSF kernels applied to the Lr dimension of the image with shape [batch_size, Lr, Ltheta, Lz]

configure(object_meta, image_meta)[source]#

Function used to initalize the transform using corresponding object and image metadata

Parameters:
Return type:

None

construct_matrix()[source]#

Constructs the matrix used to apply PSF blurring.

__call__(image, mode='forward_project')[source]#

Applies PSF modeling to the PET image.

Parameters:
  • image (torch.tensor]) – Tensor of size [batch_size, Ltheta, Lr, Lz] corresponding to the image norm_constant (torch.tensor, optional): A tensor used to normalize the output during back projection. Defaults to None.

  • mode (str) – Whether or not this is being used in forward (‘forward_project’) or backward projection (‘back_project’). Defaults to ‘forward_project’

Returns:

Tensor of size [batch_size, Ltheta, Lr, Lz] corresponding to the PSF corrected image.

Return type:

torch.tensor

pytomography.transforms.PET.psf.kernel_noncol(x, r, R, delta=1e-08)[source]#
pytomography.transforms.PET.psf.kernel_penetration(x, r, R, mu=0.87, delta=1e-08)[source]#
pytomography.transforms.PET.psf.kernel_scattering(x, r, R, scatter_fact=0.327, delta=1e-08)[source]#