This module create the main |SpatialImage| object

class image.spatial_image.SpatialImage[source]

Bases: numpy.ndarray

Associate meta data to np.ndarray

clone(data)[source]

Clone the current image metadata on the given data.

Warning

vdim is defined according to self.voxelsize and data.shape

Parameters:
  • data - (array)
Returns Type:

|SpatialImage|

invert_z_axis()[source]

invert allong 'Z' axis

classmethod valid_array(array_like)[source]
real_shape[source]
resolution
image.spatial_image.checkerboard(nx=9, ny=8, nz=5, size=10, vs=(1.0, 1.0, 1.0), dtype=<type 'numpy.uint8'>)[source]

Creates a 3D checkerboard image with nx squares in width, ny squares in height and nz squares in depth. The length of the edge in real units of each square is size.

image.spatial_image.empty_image_like(spatial_image)[source]
image.spatial_image.is2D(image)[source]

Test if the image (array) is in 2D or 3D. Return True if 2D, False if not.

image.spatial_image.null_vector_field_like(spatial_image)[source]
image.spatial_image.random_vector_field_like(spatial_image, smooth=0, max_=1)[source]

This Page