pytomography.transforms.SPECT.cutoff#

Module Contents#

Classes#

CutOffTransform

im2im transformation used to set pixel values equal to zero at the first and last few z slices. This is often required when reconstructing DICOM data due to the finite field of view of the projection data, where additional axial slices are included on the top and bottom, with zero measured detection events. This transform is included in the system matrix, to model the sharp cutoff at the finite FOV.

class pytomography.transforms.SPECT.cutoff.CutOffTransform(file_NM)[source]#

Bases: pytomography.transforms.Transform

im2im transformation used to set pixel values equal to zero at the first and last few z slices. This is often required when reconstructing DICOM data due to the finite field of view of the projection data, where additional axial slices are included on the top and bottom, with zero measured detection events. This transform is included in the system matrix, to model the sharp cutoff at the finite FOV.

Parameters:

file_NM (str) – Filepath of the DICOM file corresponding to the reconstructed object. This is needed to obtain the number of blank z-slices on the top and bottom of the projections corresponding to the particular scanner.

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

Applies the transformation.

Parameters:
  • image (torch.Tensor) – Tensor of size [batch_size, Ltheta, Lr, Lz] which transform is appplied to

  • norm_constant (torch.Tensor | None, optional) – A tensor used to normalize the output during back projection. Defaults to None.

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

Returns:

Original image, but with certain z-slices equal to zero.

Return type:

torch.tensor