Table Of Contents

Previous topic

Reference guide

Next topic

ALT api reference

This Page

MARS api reference

vplants.mars_alt.mars.fusion

class Fusion(img, deformation)[source]

Bases: object

  • `img`(SpatialImage Object) - reference image
add_image(img, matrix, deformation)[source]
fuse()[source]

Adds all the masks, adds all the images, an divides them elementwise. Returns a fused image.

fusion(im_ref, def_ref, images, matrices, deformations)[source]

vplants.mars_alt.mars.reconstruction

im2surface(image, only_altitude=False)[source]

This function computes a surfacic view of the meristem, according to a revisited version of the method described in Barbier de Reuille and al. in Plant Journal.

Parameters :
  • image (openalea.image.SpatialImage) - image to be masked
Returns :
  • mip_img (openalea.image.SpatialImage) - maximum intensity projection
  • alt_img (openalea.image.SpatialImage) - altitude of maximum intensity projection
spatialise_matrix_points(points, image)[source]

Given a list of points in matrix coordinates (i.e. i,j,k - but k is ignored anyway), and a spatial image, returns a list of points in real space (x,y,z) with the Z coordinate recomputed from an altitude map extracted from image.

points can also be a filename pointing to a numpy-compatible list of points.

surface2im(points, altitude)[source]

This function is used to convert points from maximum intensity projection to the real world.

Parameters :
  • points (list) - list of points from the maximum intensity projection
  • altitude (openalea.image.SpatialImage) - altitude of maximum intensity projection
Returns :
  • coord (list) - list of points in the real world

vplants.mars_alt.mars.segmentation

cell_segmentation(image, h_minima, volume, real=False, prefilter=True, filter_type='gaussian', filter_value='0.5')[source]
Parameters :
  • image (openalea.image.SpatialImage) - image

  • h_minima (int) - The parameter “h_minima” allows controlling the pertinence of eTruetracted minima:

    two neighboring basins will be merged if they are separated by a “mountain” whose minimal height (with respect to the higher basin) is less than “h_minima”.

  • volume (int) - Cell with too small “volume” are removed.

  • real (bool) - If real = True, volume is in real-world units else in voTrueels.

  • prefilter (bool) - The parameter “prefilter” determines if the input is pre-filtered before seed eTruetraction

    (necessary for enhance the signal/noise ratio and eliminate high frequency noise). If False, it is assumed that the input is already filtered. Default : Gaussian filtering with a standard deviation of 0.5.

  • filter_type (str) -

euclidean_sphere(size)[source]

Generate a euclidean sphere for binary morphological operations

Parameters :
  • size (int) - the shape of the euclidean sphere = 2*size + 1.
Returns :
  • Euclidean sphere which may be used for binary morphological operations, with shape equal to 2*size + 1.
filtering(img, filter_type='gaussian', filter_value=0.5)[source]
Parameters :
  • image (openalea.image.SpatialImage) - image

  • `filter_type`(str) - denoising method used for filtering (“gaussian” or “asf” for alternate sequential filter).

    default is “gaussian”.

  • filter_value (float for “gaussian” filter or int for alternate sequential filter) - value used for the filtering :
    • for a Gaussian filtering, the “filter_value” corresponds to the standard deviation.
    • for a Alternate Sequential Filter, the “filter_value” corresponds to the number of succession of morphological opening and closing operations.
mostRepresentative_filter(img, size=1)[source]

The most representated value in a neighborhood is calculated with a multi-dimensional median filter and a Euclidean sphere as structuring element.

Parameters :
  • image (SpatialImage) - image to filter.
  • size (int, optional) - the shape of the euclidean sphere = 2*size + 1. Default: size = 1
Returns :
  • Denoising image.
remove_small_cells(segmented_image, image_markers, volume, real=False)[source]

Cell with too small volume are removed. The other are set by a threshold value.

Parameters :
  • segmented_image (openalea.image.SpatialImage) - segmented image
  • image_markers (openalea.image.SpatialImage) - labeled markers image
  • volume (int) - minima volume
  • real (bool, optional) - If real = True, volume is in real-world units else in voTrueels.
seed_extraction(img, h_minima)[source]
Parameters :
  • image () - image

  • h_minima (int) - The parameter “h_minima” allows controlling the pertinence of eTruetracted minima:

    two neighboring basins will be merged if they are separated by a “mountain” whose minimal height (with respect to the higher basin) is less than “h_minima”.