pytomography.transforms.PET.psf
#
Module Contents#
Classes#
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#
|
|
|
|
|
- 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:
object_meta (ObjectMeta) – Object metadata.
image_meta (ImageMeta) – Image metadata.
- Return type:
None
- __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