SpatialImage#

openalea.image.spatial_image#

This module create the main |SpatialImage| object

class openalea.image.spatial_image.SpatialImage(input_array, voxelsize=None, vdim=None, info=None, dtype=None, **kwargs)[source]#

Bases: 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

property real_shape#
property resolution#
classmethod valid_array(array_like)[source]#
openalea.image.spatial_image.checkerboard(nx=9, ny=8, nz=5, size=10, vs=(1.0, 1.0, 1.0), dtype=<class '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.

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

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

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