Just in time for Christmas we have just released LibSBML 5.3.0. The essentials are:
like for the 5.2.0 release we again provided an alternative source archive that contains updated snapshots of all currently available SBML Level 3 Packages:
- Layout (updated)
- Flux Balance Constraints (updated)
- Rendering (new)
- Hierarchical Model Composition (updated)
- Spatial Processes (updated)
- Required Elements
SBML Rendering Package
The newest addition is a port of Ralph Gauges libSBML 4 implementation patch to the libSBML 5 package API. It supports both serialization as SBML Level 3 package and Level 2 annotation. However, there were some minor changes along the way:
- Most changes involve the plugin API, instead of directly accessing the render information from the Layout objects, you use the plugin API:
Model* model = doc->getModel();
LayoutModelPlugin *plugin = (LayoutModelPlugin*) model->getPlugin ("layout");
if (plugin == NULL || plugin->getNumLayouts() == 0)
cerr << "The loaded model contains no layout information, please add these first." << endl;
RenderListOfLayoutsPlugin *lolPlugin = (RenderListOfLayoutsPlugin*) plugin->getListOfLayouts()->getPlugin("render");
if (lolPlugin != NULL && lolPlugin->getNumGlobalRenderInformationObjects() > 0)
cout << "The loaded model contains global Render information. " << endl;
the the plugin classes then have all the elements you would need. The Render Extension extends three classes:
- ListOfLayouts: Entry point for the ListOfGlobalRenderInformation
- Layout: Entry point for the ListOfRenderInformation
- GraphicalObject: allows to set the role of a graphical object in order to pin a specific render style to it.
- There also is a minor change with the way that the XML is written out. Each attribute defined in the Render specification, is written out as belonging to the “render” namespace. With one exception, while reading through the Render specification I could not find one different between the BoundingBox defined in the Layout extension and the one used by the Render LineEndings. So rather than re-implementing another BoundingBox in a different namespace, I made the LineEndings reuse the layout bounding box.
Let me know how the extension is working for you.