Xu reconstruction method#

openalea.plantscan3d.xumethod.graphcolonization_method(mtg, startfrom, pointList, densities, minbinlength, maxbinlength, binlengthfunc, k=20, filter_short_branch=False, angle_between_trunk_and_lateral=60)[source]#

Reconstruct a tree skeleton using graph colonization with adaptive bin length.

Parameters:
  • mtg (openalea.mtg.MTG) – MTG object to add the reconstructed tree to.

  • startfrom (int) – Starting node id in the MTG.

  • pointList (list of Vector3) – Input point cloud.

  • densities (list of float) – Density values per point for adaptive bin length.

  • minbinlength (float) – Minimum bin length.

  • maxbinlength (float) – Maximum bin length.

  • binlengthfunc (callable) – Function mapping normalised density to a bin length factor.

  • k (int) – Number of nearest neighbours for connectivity.

  • filter_short_branch (bool) – If True, remove branches with no children.

  • angle_between_trunk_and_lateral (float) – Angle threshold in degrees for edge type determination.

Returns:

MTG of the reconstructed tree.

Return type:

openalea.mtg.MTG

openalea.plantscan3d.xumethod.xu_method(mtg, startfrom, pointList, binlength, k=20, filter_short_branch=False, angle_between_trunk_and_lateral=60)[source]#

Reconstruct a tree skeleton using the Xu method (distance-based clustering).

Parameters:
  • mtg (openalea.mtg.MTG) – MTG object to add the reconstructed tree to.

  • startfrom (int) – Starting node id in the MTG.

  • pointList (list of Vector3) – Input point cloud.

  • binlength (float) – Bin length for clustering.

  • k (int) – Number of nearest neighbours for connectivity.

  • filter_short_branch (bool) – If True, remove branches with no children.

  • angle_between_trunk_and_lateral (float) – Angle threshold in degrees for edge type determination.

Returns:

MTG of the reconstructed tree.

Return type:

openalea.mtg.MTG