Projector object: the projector module

astra.projector.clear()[source]

Clear all projector objects.

astra.projector.create(config)[source]

Create projector object.

Parameters:

config (dict) – Projector options.

Returns:

int – the ID of the constructed object.

astra.projector.delete(ids)[source]

Delete a projector object.

Parameters:

ids (int or list) – ID or list of ID’s to delete.

astra.projector.direct_BP(projector_id, projection, *, out)[source]

Perform a backprojection.

Input projection data and output volume are pre-allocated tensors, such as numpy arrays, or more generally tensors supporting the DLPack standard. They must satisfy the criteria of astra.data2d.link().

If the specified projector is a CUDA projector, the input and output tensors can be CPU or GPU tensors.

astra.projector.direct_FP(projector_id, volume, *, out)[source]

Perform a forward projection.

Input volume and output projection data are pre-allocated tensors, such as numpy arrays, or more generally tensors supporting the DLPack standard. They must satisfy the criteria of astra.data2d.link().

If the specified projector is a CUDA projector, the input and output tensors can be CPU or GPU tensors.

astra.projector.info()[source]

Print info on projector objects in memory.

astra.projector.is_cuda(i)[source]

Check whether a projector is a CUDA projector.

Parameters:

i (int) – ID of projector.

Returns:

bool – True if the projector is a CUDA projector.

astra.projector.matrix(i)[source]

Get sparse matrix of a projector.

Parameters:

i (int) – ID of projector.

Returns:

int – ID of sparse matrix.

astra.projector.projection_geometry(i)[source]

Get projection geometry of a projector.

Parameters:

i (int) – ID of projector.

Returns:

dict – projection geometry

astra.projector.splat(i, row, col)[source]
astra.projector.volume_geometry(i)[source]

Get volume geometry of a projector.

Parameters:

i (int) – ID of projector.

Returns:

dict – volume geometry

astra.projector.weights_projection(i, projection_index)[source]
astra.projector.weights_single_ray(i, projection_index, detector_index)[source]