tomosipo Logo
  • Tomosipo
  • Introduction and tutorials
  • Topic guides
  • Reference
    • API Summary
    • API Reference
      • tomosipo package
        • Subpackages
        • Submodules
  • HOWTOs and recipes
  • Changelog
tomosipo
  • Reference
  • API Reference
  • tomosipo package
  • tomosipo.links package
  • tomosipo.links.base module
  • View page source

tomosipo.links.base module

class tomosipo.links.base.Link(shape, initial_value)[source]

Bases: object

A 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]
Previous Next

© Copyright 2020, Allard Hendriksen.

Built with Sphinx using a theme provided by Read the Docs.