Skip to content

Reference for pyronn/ct_reconstruction/layers/torch/projection_3d.py


pyronn.ct_reconstruction.layers.torch.projection_3d.ConeProjection3DFunction

Bases: Function

forward staticmethod

forward(ctx, input: Tensor, sinogram_shape: Tensor, volume_origin: Tensor, volume_spacing: Tensor, trajectory: Tensor, projection_multiplier: Tensor, step_size: Tensor, hardware_interp: Tensor) -> Tensor

Forward operator of 2D fan projection Args: input: volume to be projected sinogram_shape: number_of_projections x detector_width volume_origin: origin of the world coordinate system w.r.t. the volume array (tensor) ...

Source code in pyronn/ct_reconstruction/layers/torch/projection_3d.py
@staticmethod
def forward(ctx, input:Tensor, sinogram_shape:Tensor, volume_origin:Tensor, volume_spacing:Tensor, trajectory:Tensor,
                 projection_multiplier:Tensor, step_size:Tensor, hardware_interp:Tensor)->Tensor:
    """
    Forward operator of 2D fan projection
    Args: 
            input:              volume to be projected
            sinogram_shape:     number_of_projections x detector_width
            volume_origin:      origin of the world coordinate system w.r.t. the volume array (tensor)
            ...
    """
    outputs = pyronn_layers.cone_projection3d(input,sinogram_shape, volume_origin,volume_spacing,trajectory, step_size, hardware_interp)

    ctx.volume_shape            = torch.tensor(input.shape[1:]).cuda()
    ctx.volume_origin           = volume_origin
    ctx.volume_spacing          = volume_spacing
    ctx.trajectory              = trajectory
    ctx.projection_multiplier   = projection_multiplier
    ctx.hardware_interp         = hardware_interp

    return outputs





pyronn.ct_reconstruction.layers.torch.projection_3d.ConeProjection3D

ConeProjection3D(hardware_interp=False)

Bases: Module

Source code in pyronn/ct_reconstruction/layers/torch/projection_3d.py
def __init__(self, hardware_interp = False):
    # TODO: Document this function on your own. Could not be documented by the model.
    # TODO: Document this function on your own. Could not be documented by the model.
    super(ConeProjection3D, self).__init__()
    self.hardware_interp = torch.Tensor([hardware_interp]).cpu()