nornir-buildmanager
Scripts and libraries for constructing 3D volumes from 2D image sets using the Nornir stack.
Python import:
nornir_buildmanagerCLI entrypoint:
nornir-build
API reference
The command sequence from import through VikingXML is Build a volume. A grouped list of pipeline names is Pipeline catalogue.
VolumeData dirty / save ownership
Pipeline stages and volumemanager getters follow this contract:
Create children only in setters /
GetOrCreate*/UpdateOrAddChild*. Ordinary getters must not create (example:BlockNode.NonStosSectionNumbersreturns an empty frozenset when the child is missing).Dirty flags (
_AttributesChanged,_ChildrenChanged) live on the mutated node. Linked children do not bubble dirtiness to parents.Stage yields should return the node that needs saving (often Volume or Block after membership changes).
PipelineManager._SaveNodestreats anElementTree.Elementas a single save target (not an iterable of children) and skipsNone.
See the package README.md table of VolumeData.xml locations and
tests/test_import_volumedata_save.py.
VikingXML Version 2
CreateVikingXML emits Volume/@Version="2" with a nested layout:
All
Sectionelements live under a singleSectionswrapper.Each requested
-StosGroupbecomes aStosGroupelement (Nameis the File → Transform → SliceToVolume menu label in Viking). Nestedstoschildren list individual transforms and omit redundantGroupName.CreateVikingXMLwrites{Block.Path}/{Name}.zipcontaining the StosMap-selected.stosfiles (not every file under the group directory) as members at the archive root (basename only, no subfolders). It setsStosGroup/@zipto that volume-relative path (parent Block path included, e.g.TEM/SliceToVolume1.zip). Nestedstos/@pathvalues use the same basename so they match zip entries. Rewrite is skipped when the zip’s mtime and member set already match those transforms. Viking should GET the zip once and fall back to each child’spathfor any.stosmissing from the archive (same pattern as the older volume-levelStosZipattribute).
Example:
<Volume Version="2" Name="..." num_stos="N" num_sections="M" InputChecksum="...">
<Sections>
<Section Number="1" Path="..." Name="...">...</Section>
</Sections>
<StosGroup Name="SliceToVolume1" zip="TEM/SliceToVolume1.zip">
<stos controlSection="645" mappedSection="1" path="1-645.stos"
pixelspacing="1" type="Grid"/>
</StosGroup>
</Volume>