pytomography.transforms.PET.psf#

Module Contents#

Classes#

PETPSFTransform

proj2proj 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

proj2proj 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 projections with shape [batch_size, Lr, Ltheta, Lz]

configure(object_meta, proj_meta)[source]#

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

Parameters:
  • object_meta (ObjectMeta) – Object metadata.

  • proj_meta (ProjMeta) – Projection metadata.

Return type:

None

construct_matrix()[source]#

Constructs the matrix used to apply PSF blurring.

forward(proj)[source]#

Applies the forward projection of PSF modeling \(B:\mathbb{V} \to \mathbb{V}\) to a PET proj.

Parameters:

proj (torch.tensor]) – Tensor of size [batch_size, Ltheta, Lr, Lz] corresponding to the projections

Returns:

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

Return type:

torch.tensor

backward(proj, norm_constant=None)[source]#

Applies the back projection of PSF modeling \(B^T:\mathbb{V} \to \mathbb{V}\) to PET projections .

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

  • norm_constant (torch.Tensor | None) –

Returns:

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

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]#