pytomography.transforms.SPECT.cutoff#

Module Contents#

Classes#

CutOffTransform

proj2proj 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(proj)[source]#

Bases: pytomography.transforms.Transform

proj2proj 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:

proj (torch.tensor) – Measured projection data.

forward(proj)[source]#

Forward projection \(B:\mathbb{V} \to \mathbb{V}\) of the cutoff transform.

Parameters:

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

Returns:

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

Return type:

torch.tensor

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

Back projection \(B^T:\mathbb{V} \to \mathbb{V}\) of the cutoff transform. Since this is a diagonal matrix, the implementation is the same as forward projection, but with the optional norm_constant argument.

Parameters:
  • proj (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.

Returns:

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

Return type:

torch.tensor