Skip to content

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


pyronn.ct_reconstruction.layers.torch.projection_2d.ParallelProjection2DFunction

Bases: Function


              flowchart TD
              pyronn.ct_reconstruction.layers.torch.projection_2d.ParallelProjection2DFunction[ParallelProjection2DFunction]

              

              click pyronn.ct_reconstruction.layers.torch.projection_2d.ParallelProjection2DFunction href "" "pyronn.ct_reconstruction.layers.torch.projection_2d.ParallelProjection2DFunction"
            

forward staticmethod

forward(ctx, input: Tensor, sinogram_shape: Tensor, volume_origin: Tensor, detector_origin: Tensor, volume_spacing: Tensor, detector_spacing: Tensor, trajectory) -> Tensor

Forward operator of 2D parallel 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_2d.py
@staticmethod
def forward(ctx, input:Tensor, sinogram_shape:Tensor, volume_origin:Tensor, detector_origin:Tensor, volume_spacing:Tensor, detector_spacing:Tensor, trajectory)->Tensor:
    """
    Forward operator of 2D parallel 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.parallel_projection2d(input,sinogram_shape, volume_origin,detector_origin,volume_spacing,detector_spacing,trajectory)

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

    return outputs





pyronn.ct_reconstruction.layers.torch.projection_2d.ParallelProjection2D

ParallelProjection2D()

Bases: Module


              flowchart TD
              pyronn.ct_reconstruction.layers.torch.projection_2d.ParallelProjection2D[ParallelProjection2D]

              

              click pyronn.ct_reconstruction.layers.torch.projection_2d.ParallelProjection2D href "" "pyronn.ct_reconstruction.layers.torch.projection_2d.ParallelProjection2D"
            
Source code in pyronn/ct_reconstruction/layers/torch/projection_2d.py
def __init__(self):
    # 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(ParallelProjection2D, self).__init__()





pyronn.ct_reconstruction.layers.torch.projection_2d.FanProjection2DFunction

Bases: Function


              flowchart TD
              pyronn.ct_reconstruction.layers.torch.projection_2d.FanProjection2DFunction[FanProjection2DFunction]

              

              click pyronn.ct_reconstruction.layers.torch.projection_2d.FanProjection2DFunction href "" "pyronn.ct_reconstruction.layers.torch.projection_2d.FanProjection2DFunction"
            

forward staticmethod

forward(ctx, input: Tensor, sinogram_shape: Tensor, volume_origin: Tensor, detector_origin: Tensor, volume_spacing: Tensor, detector_spacing: Tensor, source_isocenter_distance: Tensor, source_detector_distance: Tensor, trajectory: 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_2d.py
@staticmethod
def forward(ctx, input:Tensor, sinogram_shape:Tensor, volume_origin:Tensor, detector_origin:Tensor, volume_spacing:Tensor, detector_spacing:Tensor, source_isocenter_distance:Tensor, source_detector_distance:Tensor, trajectory: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.fan_projection2d(input,sinogram_shape, volume_origin,detector_origin,volume_spacing,detector_spacing,source_isocenter_distance,source_detector_distance,trajectory)

    ctx.volume_shape        = torch.tensor(input.shape[1:]).cuda()
    ctx.volume_origin       = volume_origin
    ctx.detector_origin     = detector_origin
    ctx.volume_spacing      = volume_spacing
    ctx.detector_spacing    = detector_spacing
    ctx.source_isocenter_distance      = source_isocenter_distance
    ctx.source_detector_distance    = source_detector_distance
    ctx.trajectory          = trajectory

    return outputs





pyronn.ct_reconstruction.layers.torch.projection_2d.FanProjection2D

FanProjection2D()

Bases: Module


              flowchart TD
              pyronn.ct_reconstruction.layers.torch.projection_2d.FanProjection2D[FanProjection2D]

              

              click pyronn.ct_reconstruction.layers.torch.projection_2d.FanProjection2D href "" "pyronn.ct_reconstruction.layers.torch.projection_2d.FanProjection2D"
            
Source code in pyronn/ct_reconstruction/layers/torch/projection_2d.py
def __init__(self):
    # 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(FanProjection2D, self).__init__()