Visualization#

openalea.plantscan3d.visualization.mtg_to_scene(mtg, positionproperty='position', radiusproperty='radius')[source]#

Generate a scene with reconstructed radius from a MTG object.

Parameters:
  • mtg (openalea.mtg.MTG) – MTG object to be converted to a scene.

  • positionproperty (str) – Name of the property in the mtg to store the position of the nodes. Default to “position”.

  • radiusproperty (str) – Name of the property in the mtg to store the radius of the nodes. Default to “radius”.

Return type:

A openalea.plantgl.Scene object representing the reconstructed MTG.

openalea.plantscan3d.visualization.nodemtg_to_scene(mtg, segment_inf_color=(0, 0, 0), segment_plus_color=(200, 200, 0), node_color=(0, 200, 0), node_size=5, segment_size=2, positionproperty='position')[source]#

Generate a scene with the nodes from the reconstructed mtg object.

Parameters:
  • mtg (openalea.mtg.MTG) – MTG object that contains the nodes to be converted to a scene.

  • segment_inf_color (tuple) – RGB color of the segment that follow the previous node (“<”). Default to (0, 0, 0).

  • segment_plus_color (tuple) – RGB color of the segment that branches the previous node (“+”). Default to (200, 200, 0).

  • node_color (tuple) – RGB color of the node. Default to (0, 200, 0).

  • node_size (int) – Size of the node. Default to 5.

  • segment_size (int) – Size of the segment line. Default to 2.

  • positionproperty (str) – Name of the property in the mtg to store the position of the nodes. Default to “position”.

Return type:

A openalea.plantgl.Scene object representing the reconstructed MTG.

openalea.plantscan3d.visualization.points_to_scene(points)[source]#

Generate a scene with the point cloud.

Parameters:

points (PointSet) – Point cloud to be rendered in the Scene.

Return type:

A openalea.plantgl.Scene object representing the point cloud.

openalea.plantscan3d.visualization.view(sc)[source]#

Perform a quick view of the scene.

Parameters:

sc (openalea.plantgl.Scene) – Scene to be viewed.

openalea.plantscan3d.visualization.view_points(points)[source]#