tomosipo.links.base module
- class tomosipo.links.base.Link(shape, initial_value)[source]
Bases:
objectA General base class for link types
- clone()[source]
- context()[source]
Context-manager to manage ASTRA interactions
This is a no-op for numpy data.
This context-manager used, for example, for pytorch data on GPU to make sure the current CUDA stream is set to the device of the input data.
- Returns:
- Return type:
- property data
Returns the underlying data.
Changes to the return value will be reflected in the astra data.
- property linked_data
Returns a numpy array or GPULink object
- Returns:
- Return type:
- new_empty(shape)[source]
- new_full(shape, value)[source]
- new_zeros(shape)[source]
- property shape
- tomosipo.links.base.are_compatible(link_a, link_b)[source]
- tomosipo.links.base.geometry_shape(geometry)[source]
- tomosipo.links.base.link(geometry, arr)[source]