tomosipo.geometry.VolumeVectorGeometry

class tomosipo.geometry.VolumeVectorGeometry(shape, pos, w=(1, 0, 0), v=(0, 1, 0), u=(0, 0, 1))[source]

Documentation for VolumeVectorGeometry

__init__(shape, pos, w=(1, 0, 0), v=(0, 1, 0), u=(0, 0, 1))[source]

Create an arbitrarily oriented volume geometry

Like the parallel and cone vector geometries, the volume vector geometry can be arbitrarily oriented and positioned.

The position describes the center of the volume. The vectors w, v, u describe the coordinate frame of a single voxel, just like u and v do for detector pixels of vector projection geometries.

Parameters:
  • shape – The shape of the volume in voxels.

  • pos – A numpy array of dimension (num_steps, 3) describing the center of the volume in world-coordinates (z, y, x). You may also pass a 3-tuple or a scalar.

  • w – A numpy array of dimension (num_steps, 3) describing the w basis element in (z, y, x) coordinates. Default is (1, 0, 0).

  • v – A numpy array of dimension (num_steps, 3) describing the v basis element in (z, y, x) coordinates. Default is (0, 1, 0).

  • u – A numpy array of dimension (num_steps, 3) describing the u basis element in (z, y, x) coordinates. Default is (0, 0, 1).

Methods

__init__(shape, pos[, w, v, u])

Create an arbitrarily oriented volume geometry

reshape(new_shape)

Change the number of voxels without changing volume size

to_vec()

Returns a volume vector geometry

Attributes

corners

Returns a vector with the corners of the volume

lower_left_corner

Returns a vector with the positions of the lower-left corner the object

num_steps

The number of orientations and positions of this volume

pos

shape

size

Returns the absolute size of the volume

sizes

Returns the absolute sizes of the volume

u

v

voxel_size

The voxel size of the volume

voxel_sizes

The voxel sizes of the volume

w