CTProjectionOp.py 🚧¢

Source: LION/operators/CTProjectionOp.py

Warning

This file has not yet received a complete narrative and docstring audit. Its public source-level API is listed automatically below.

Thin wrapper around tomosipo’s Operator class for linear tomographic projection.

class CTProjectionOp(ts_operator: ts.Operator.Operator, device: torch.device | str | None = None)

Tomographic projection operator and its adjoint using tomosipo.

Parameters β€”β€”β€”- ts_operator : tomosipo.Operator.Operator Tomosipo operator implementing the tomographic projection and its adjoint. device : torch.device | str | None, optional Device for computations. If None, computations are done on the default device.

CTProjectionOp.cite(cite_format: str = 'MLA') None

Print citations for the tomosipo and ASTRA projection backends.

CTProjectionOp.forward(self, x: torch.Tensor) torch.Tensor

Apply the forward of CTProjectionOp.

Note

Prefer calling the instance of the CTProjectionOp operator as operator(x) over directly calling this method. See this PyTorch discussion.

CTProjectionOp.adjoint(self, y: torch.Tensor) torch.Tensor

Apply the backprojection.

Parameters β€”β€”β€”- y : torch.Tensor The input projection dataset to which the backprojection is applied.

Returns β€”β€”- torch.Tensor The volume dataset on which the projection dataset has been backprojected.

CTProjectionOp.domain_shape(self) tuple[int, ...]

Return the shape of the volume domain.

CTProjectionOp.range_shape(self) tuple[int, ...]

Return the shape of the projection range.