pytomography.transforms.SPECT.cutoff#

Module Contents#

Classes#

CutOffTransform

The parent class for all transforms used in reconstruction (obj2obj, im2im, obj2im). Subclasses must implement the __call__ method.

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

Bases: pytomography.transforms.Transform

The parent class for all transforms used in reconstruction (obj2obj, im2im, obj2im). Subclasses must implement the __call__ method.

Parameters:

device (str) – Pytorch device used for computation

forward(proj, padded=True)[source]#

Cuts off the projection data outside of a certain region. :param proj: Projection data :type proj: torch.Tensor :param padded: Whether or not the projection data is padded. Defaults to True. :type padded: bool, optional

Returns:

Projection data with cutoff applied

Return type:

torch.Tensor

Parameters:
  • proj (torch.Tensor) –

  • padded (bool) –

backward(proj, padded=True)[source]#

Returns the projection data without the cutoff. :param proj: Projection data :type proj: torch.Tensor :param padded: Whether or not the projection data is padded. Defaults to True. :type padded: bool, optional

Returns:

Projection data without cutoff

Return type:

torch.Tensor

Parameters:
  • proj (torch.Tensor) –

  • padded (bool) –