pytomography.transforms.PET.psf — PyTomography 0.8.0 documentation

Skip to main content
`Ctrl`+`K`

# `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)

  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)

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

    Parameters:

      - object_meta (ObjectMeta) – Object metadata.

      - image_meta (ImageMeta) – Image metadata.

    Return type:

      None

  construct_matrix()

    Constructs the matrix used to apply PSF blurring.

  forward(image)

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

    Parameters:

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

    Returns:

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

    Return type:

      torch.tensor

  backward(image, norm_constant=None)

    Applies the back projection of PSF modeling \(B^T:\mathbb{V} \to \mathbb{V}\) to a 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.

      - norm_constant (torch.Tensor | None) –

    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)

pytomography.transforms.PET.psf.kernel_penetration(x, r, R, mu=0.87, delta=1e-08)

pytomography.transforms.PET.psf.kernel_scattering(x, r, R, scatter_fact=0.327, delta=1e-08)