Skip to content

space

Classes:

Name Description
FloatArray
SpaceProtocol
ShapeScaleSpace

Space defined by its shape and voxel size.

ExtentScaleSpace

Space defined by its physical extent and voxel size.

ShapeExtentSpace

Space defined by its shape and physical extent.

DownscaledSpace

Space with voxels downscale times larger than the other space.

UpscaledSpace

Space with voxels upscale times smaller than the other space.

Attributes:

Name Type Description
ArrayType
ConcreteSpace
Space

ArrayType module-attribute

ArrayType = TypeVar('ArrayType')

ConcreteSpace module-attribute

Space module-attribute

FloatArray

SpaceProtocol

Attributes:

Name Type Description
axes tuple[str, ...]
shape tuple[int, ...]
scale tuple[float, ...]

axes property

axes: tuple[str, ...]

shape property

shape: tuple[int, ...]

scale property

scale: tuple[float, ...]

ShapeScaleSpace

Space defined by its shape and voxel size.

Parameters:

Name Type Description Default
shape tuple[int, ...]

Number of voxels along each axis (Z, Y, X).

required
scale tuple[float, ...]

Voxel size along each axis, in µm. A single number applies to all axes. Defaults to 1.

()
axes tuple[Axis, ...]

Axis names, by default the last len(shape) of (Z, Y, X).

(<Axis.Z>, <Axis.Y>, <Axis.X>)

Methods:

Name Description
extent

extent

extent() -> tuple[float, ...]

ExtentScaleSpace

Space defined by its physical extent and voxel size.

Parameters:

Name Type Description Default
extent tuple[float, ...]

Size of the space along each axis, in µm.

required
scale tuple[float, ...]

Voxel size along each axis, in µm. A single number applies to all axes.

required
axes tuple[Axis, ...]

Axis names, by default the last len(extent) of (Z, Y, X).

(<Axis.Z>, <Axis.Y>, <Axis.X>)

Attributes:

Name Type Description
shape tuple[int, ...]

shape property

shape: tuple[int, ...]

ShapeExtentSpace

Space defined by its shape and physical extent.

Parameters:

Name Type Description Default
shape tuple[int, ...]

Number of voxels along each axis (Z, Y, X).

required
extent tuple[float, ...]

Size of the space along each axis, in µm.

required
axes tuple[Axis, ...]

Axis names, by default the last len(shape) of (Z, Y, X).

(<Axis.Z>, <Axis.Y>, <Axis.X>)

Attributes:

Name Type Description
scale tuple[float, ...]

scale property

scale: tuple[float, ...]

DownscaledSpace

Space with voxels downscale times larger than the other space.

Parameters:

Name Type Description Default
downscale tuple[int, ...] | int

Integer factor, for all axes or per axis.

required
reference ExtentScaleSpace | ShapeExtentSpace | ShapeScaleSpace | None

The space this one is relative to. Set automatically by Simulation.

None

Methods:

Name Description
rescale

Attributes:

Name Type Description
shape tuple[int, ...]
scale tuple[float, ...]

shape property

shape: tuple[int, ...]

scale property

scale: tuple[float, ...]

rescale

rescale(
    img: xrDataArray, mean_axes: Collection[str] = ()
) -> xrDataArray

UpscaledSpace

Space with voxels upscale times smaller than the other space.

Parameters:

Name Type Description Default
upscale tuple[float, ...] | int

Factor, for all axes or per axis.

required
reference ExtentScaleSpace | ShapeExtentSpace | ShapeScaleSpace | None

The space this one is relative to. Set automatically by Simulation.

None

Attributes:

Name Type Description
shape tuple[int, ...]
scale tuple[float, ...]

shape property

shape: tuple[int, ...]

scale property

scale: tuple[float, ...]