Serial#
- openalea.plantscan3d.serial.complete_lines(mtg)[source]#
Propagate ‘_line’ property values upward to parent nodes that lack them.
- Parameters:
mtg (openalea.mtg.MTG) – MTG object with a ‘_line’ property.
- openalea.plantscan3d.serial.convertStdMTGWithNode(g, useHeuristic=True, invertCoord=False, propagate_parent=False)[source]#
Convert a standard MTG (with XX, YY, ZZ properties) to an MTG with a Vector3 ‘position’ property, handling interpolation and heuristics.
- Parameters:
g (openalea.mtg.MTG) – Standard MTG object with XX, YY, ZZ scalar properties and ‘_line’.
useHeuristic (bool) – If True, use a heuristic to estimate positions for nodes that could not be otherwise positioned.
invertCoord (bool) – If True, negate the Z coordinate.
propagate_parent (bool) – If True, propagate parent positions when a node’s complex root has coordinates but the node itself does not.
- Return type:
None. The MTG is modified in-place with a ‘position’ property.
- openalea.plantscan3d.serial.convertToMyMTG(mtg)[source]#
Convert an MTG with XX, YY, ZZ properties back to a Vector3 ‘position’ property.
- Parameters:
mtg (openalea.mtg.MTG) – MTG object with XX, YY, ZZ scalar properties.
- Returns:
The same MTG with a ‘position’ property added and scalar properties removed.
- Return type:
openalea.mtg.MTG
- openalea.plantscan3d.serial.convertToStdMTG(g)[source]#
Convert an MTG with a ‘position’ property to separate XX, YY, ZZ properties.
- Parameters:
g (openalea.mtg.MTG) – MTG object with a Vector3 ‘position’ property.
- Returns:
New MTG with XX, YY, ZZ scalar properties instead of ‘position’.
- Return type:
openalea.mtg.MTG
- openalea.plantscan3d.serial.max_heigth(g, scale=None)[source]#
Compute the maximum height (depth) of the MTG.
- openalea.plantscan3d.serial.max_order(g, scale=None)[source]#
Compute the maximum branching order of the MTG.
- openalea.plantscan3d.serial.quantisefunc(fn=None, qfunc=None)[source]#
Create a QuantisedFunction from a scene file or a function.
- openalea.plantscan3d.serial.writeAscPoints(fn, points)[source]#
Write points to an ASCII PlantGL scene file.
- openalea.plantscan3d.serial.writeMTGfile(fn, g, properties=[('XX', 'REAL'), ('YY', 'REAL'), ('ZZ', 'REAL'), ('radius', 'REAL')])[source]#
Write an MTG to an MTG file format.