io API
XML SmartRoot / RootNav / RootSystemTracker reader and writer
- MTG writer:
Generate same file.
Manage an MTG with 2 scales: Plant, RootAxis
Manage an MTG with 3 scales: Plant, RootAxis, Segment
Visualisation:
1. PlantGL and Matplotlib
2. Time-series
3. Annotations
-
class openalea.rsml.io.Annotation(name)[source]
Bases: object
-
class openalea.rsml.io.Dumper[source]
Bases: object
Convert an MTG into RSML format
-
SubElement(parent, tag, text='', attrib={}, **kwds)[source]
-
SubTree(parent, tag, tree)[source]
recursively add tree to xml parent element
tree is a dictionary, for which a tag child is appended to parent
Then recursively add:
-
accession = '{http://www.plantontology.org/xml-dtd/po.dtd}accession'
-
dump(graph)[source]
-
functions(axis, **props)[source]
Set the root axis functions
axis is the xml element id of the root axis
props ….
-
geometry(axis, **props)[source]
Set the root axis geometry elements
axis is the xml element id of the root axis
props should contain a suitable ‘geometry’ attribute
TODO: other geometry types?
-
image(metadata)[source]
dump image element of metadata
-
metadata()[source]
-
mtg()[source]
Convert the MTG into a XML tree.
-
observation_hours(metadata)[source]
dump observation-hours element of metadata
-
plant(vid)[source]
-
properties(vid, axis)[source]
set the axis properties
-
property_definitions(metadata)[source]
dump property definitions of metadata
-
root(xml_parent, mtg_vid)[source]
-
scene()[source]
-
class openalea.rsml.io.Parser[source]
Bases: object
Read an XML file an convert it into an MTG.
-
static add_field(elt, my_dict)[source]
Update the properties in the MTG
-
annotation(elts, **properties)[source]
Annotations attached to a part of the MTG.
-
annotations(elts, **properties)[source]
Annotations attached to a part of the MTG.
-
dispatch(elt)[source]
Call the suitable function to process elt w.r.t to elt.tag
-
function(elts, **properties)[source]
A root axis with geometry, functions, properties.
-
function_definition(elts, **properties)[source]
A plant with parameters and a recursive structure
-
functions(elts, **properties)[source]
A root axis with geometry, functions, properties.
-
geometry(elts, **properties)[source]
A root axis - geometry
-
image(elts, **properties)[source]
A plant with parameters and a recursive structure.
-
metadata(elts, **properties)[source]
Parse image information
-
parse(filename, debug=False)[source]
-
plant(elts, **properties)[source]
A plant with parameters and a recursive structure.
-
point(elts, **properties)[source]
-
polyline(elts, **properties)[source]
A root axis - geometry - polyline
-
properties(elts)[source]
Update the tooy properties in the MTG
-
property_definition(elts, **properties)[source]
A plant with parameters and a recursive structure
-
property_definitions(elts, **properties)[source]
A plant with parameters and a recursive structure.
-
root(elts, **attrib)[source]
A root axis with geometry, functions, properties
-
rsml(elts, **properties)[source]
A RSA with attributes, parameters and a recursive structure.
-
sample(elt, domain)[source]
-
scene(elts, **properties)[source]
A plant with parameters and a recursive structure.
-
time_sequence(elts, **properties)[source]
A plant with parameters and a recursive structure.
-
openalea.rsml.io.mtg2rsml(g, rsml_file)[source]
Write continuous mtg g in rsml_file
- See also:
Dumper, rsml.continuous
-
openalea.rsml.io.read_xml_tree(elt)[source]
return xml tree elt
-
openalea.rsml.io.rsml2mtg(rsml_graph, debug=False)[source]
Convert a rsml string, or file, to a MTG.
-
openalea.rsml.io.str2datetime(str_time)[source]
convert datetime string to datetime object
Download the source file ../../src/openalea/rsml/io.py.