nornir_volumemodel API

class nornir_volumemodel.Block(**kwargs)[source]

Bases: DirectoryResource, Named

A grouping of contiguous Z-sections within a volume.

A Block is the second level of the volume hierarchy (Volume → Block → Section → Channel …). In a typical Nornir experiment one block spans all physical sections, but the model allows multiple named blocks (e.g. separate tissue blocks imaged in the same experiment).

Blocks own:

  • A list of Section objects.

  • Optional section-to-section (STOS) alignment groups and maps.

AddSection(val)[source]

Append a section to this block.

Parameters:

val (section.Section) – Section to add; must not already be present.

Raises:

AssertionError – if val is not a Section or is a duplicate.

property Sections

List of Section objects in this block.

StosGroups()[source]

Return the dictionary of section-to-section alignment groups keyed by group name.

StosMaps()[source]

Return the dictionary of STOS alignment maps keyed by map name.

class nornir_volumemodel.Channel(**kwargs)[source]

Bases: DirectoryResource, Named

classdocs

AddFilter(val)[source]
AddTransform(val)[source]
property Filters
property Scale
property Transforms
class nornir_volumemodel.Data(**kwargs)[source]

Bases: FileResource

Represents a file on disk with hashable amount of data

class nornir_volumemodel.DirectoryResource[source]

Bases: ExternalResource

class nornir_volumemodel.ExternalResource[source]

Bases: ModelBase

Properties of objects whose data is stored outside the object file structure, such as on a file system

property FullPath
property Parent
property Path
property RelativePath

Relative path from volume root

class nornir_volumemodel.FileResource[source]

Bases: ExternalResource

Represents a file

property Checksum
property Type
class nornir_volumemodel.Filter(**kwargs)[source]

Bases: DirectoryResource, Named

classdocs

property HistogramData
property ImageSet
property PruneData
property TilePyramid
class nornir_volumemodel.Image(**kwargs)[source]

Bases: FileResource

An image file on disk

property MaskPath
class nornir_volumemodel.ImageSet(**kwargs)[source]

Bases: DirectoryResource, PyramidInterface

classdocs

GetImages()[source]
class nornir_volumemodel.InputTransformPropertySet(**kwargs)[source]

Bases: object

property InputTransformChecksum
property InputTransformType
class nornir_volumemodel.Level(**kwargs)[source]

Bases: DirectoryResource

classdocs

property Image
property Number
nornir_volumemodel.Load_Xml(VolumePath, Create=False, UseCache=True)

Load the volume information for the specified directory or create one if it doesn’t exist

class nornir_volumemodel.ModelBase[source]

Bases: object

Properties common to all volume objects

property Version
class nornir_volumemodel.Named[source]

Bases: object

Object that contains other objects. Path always refers to a directory

property Name
class nornir_volumemodel.Numbered[source]

Bases: object

Object that contains other objects. Path always refers to a directory

property Number
nornir_volumemodel.Save_Xml(XMLPath)
class nornir_volumemodel.Scale(**kwargs)[source]

Bases: ModelBase

classdocs

property AxisNames
GetAxis(axisname)[source]
SetAxis(axisname, UnitsPerPixel, UnitsOfMeasure)[source]
property X
property Y
property Z
class nornir_volumemodel.Section(**kwargs)[source]

Bases: DirectoryResource, Numbered

One physical Z-slice (section) of the volume.

A Section is identified by its integer Number (the Z-level in the volume stack). It holds one or more imaging Channel objects — e.g. TEM and Leveled — each of which owns filters, tile pyramids, and registration transforms.

AddChannel(val)[source]

Append a channel to this section.

Parameters:

val (channel.Channel) – Channel to add; must not already be present.

Raises:

AssertionError – if val is not a Channel or is a duplicate.

property Channels

List of Channel objects for this section.

class nornir_volumemodel.TilePyramid(**kwargs)[source]

Bases: DirectoryResource, PyramidInterface

classdocs

class nornir_volumemodel.Transform(**kwargs)[source]

Bases: FileResource, InputTransformPropertySet

Represents a file on disk with hashable amount of data

class nornir_volumemodel.Volume(**kwargs)[source]

Bases: DirectoryResource, Named

Top-level container for a Nornir-registered electron-microscopy volume.

A Volume is the root of the object hierarchy. It owns one or more Block objects, each of which groups a contiguous run of Z-sections and their associated image channels, filters, tile pyramids, and registration transforms.

Typical usage:

import nornir_volumemodel
vol = nornir_volumemodel.Load_Xml('/path/to/volume.xml')
for block in vol.Blocks:
    for section in block.Sections:
        print(section.Number)
AddBlock(val)[source]

Append a block to this volume.

Parameters:

val (block.Block) – Block to add; must not already be present.

Raises:

AssertionError – if val is not a Block or is a duplicate.

property Blocks

List of Block objects in this volume.

Created on Apr 11, 2014

@author: u0490822

class nornir_volumemodel.model.volume.DirectoryResource[source]

Bases: ExternalResource

class nornir_volumemodel.model.volume.Named[source]

Bases: object

Object that contains other objects. Path always refers to a directory

property Name
class nornir_volumemodel.model.volume.Volume(**kwargs)[source]

Bases: DirectoryResource, Named

Top-level container for a Nornir-registered electron-microscopy volume.

A Volume is the root of the object hierarchy. It owns one or more Block objects, each of which groups a contiguous run of Z-sections and their associated image channels, filters, tile pyramids, and registration transforms.

Typical usage:

import nornir_volumemodel
vol = nornir_volumemodel.Load_Xml('/path/to/volume.xml')
for block in vol.Blocks:
    for section in block.Sections:
        print(section.Number)
AddBlock(val)[source]

Append a block to this volume.

Parameters:

val (block.Block) – Block to add; must not already be present.

Raises:

AssertionError – if val is not a Block or is a duplicate.

property Blocks

List of Block objects in this volume.

Created on Apr 11, 2014

@author: u0490822

class nornir_volumemodel.model.block.Block(**kwargs)[source]

Bases: DirectoryResource, Named

A grouping of contiguous Z-sections within a volume.

A Block is the second level of the volume hierarchy (Volume → Block → Section → Channel …). In a typical Nornir experiment one block spans all physical sections, but the model allows multiple named blocks (e.g. separate tissue blocks imaged in the same experiment).

Blocks own:

  • A list of Section objects.

  • Optional section-to-section (STOS) alignment groups and maps.

AddSection(val)[source]

Append a section to this block.

Parameters:

val (section.Section) – Section to add; must not already be present.

Raises:

AssertionError – if val is not a Section or is a duplicate.

property Sections

List of Section objects in this block.

StosGroups()[source]

Return the dictionary of section-to-section alignment groups keyed by group name.

StosMaps()[source]

Return the dictionary of STOS alignment maps keyed by map name.

class nornir_volumemodel.model.block.DirectoryResource[source]

Bases: ExternalResource

class nornir_volumemodel.model.block.Named[source]

Bases: object

Object that contains other objects. Path always refers to a directory

property Name

Created on Apr 11, 2014

@author: u0490822

class nornir_volumemodel.model.section.DirectoryResource[source]

Bases: ExternalResource

class nornir_volumemodel.model.section.Numbered[source]

Bases: object

Object that contains other objects. Path always refers to a directory

property Number
class nornir_volumemodel.model.section.Section(**kwargs)[source]

Bases: DirectoryResource, Numbered

One physical Z-slice (section) of the volume.

A Section is identified by its integer Number (the Z-level in the volume stack). It holds one or more imaging Channel objects — e.g. TEM and Leveled — each of which owns filters, tile pyramids, and registration transforms.

AddChannel(val)[source]

Append a channel to this section.

Parameters:

val (channel.Channel) – Channel to add; must not already be present.

Raises:

AssertionError – if val is not a Channel or is a duplicate.

property Channels

List of Channel objects for this section.

Created on Apr 11, 2014

@author: u0490822

class nornir_volumemodel.model.channel.Channel(**kwargs)[source]

Bases: DirectoryResource, Named

classdocs

AddFilter(val)[source]
AddTransform(val)[source]
property Filters
property Scale
property Transforms
class nornir_volumemodel.model.channel.DirectoryResource[source]

Bases: ExternalResource

class nornir_volumemodel.model.channel.Named[source]

Bases: object

Object that contains other objects. Path always refers to a directory

property Name

Created on Apr 11, 2014

@author: u0490822

class nornir_volumemodel.model.scale.AxisScale(UnitsPerPixel, UnitsOfMeasure)[source]

Bases: object

property UnitsOfMeasure
property UnitsPerPixel
class nornir_volumemodel.model.scale.ModelBase[source]

Bases: object

Properties common to all volume objects

property Version
class nornir_volumemodel.model.scale.Scale(**kwargs)[source]

Bases: ModelBase

classdocs

property AxisNames
GetAxis(axisname)[source]
SetAxis(axisname, UnitsPerPixel, UnitsOfMeasure)[source]
property X
property Y
property Z

Created on Apr 11, 2014

@author: u0490822

class nornir_volumemodel.model.transform.FileResource[source]

Bases: ExternalResource

Represents a file

property Checksum
property Type
class nornir_volumemodel.model.transform.InputTransformPropertySet(**kwargs)[source]

Bases: object

property InputTransformChecksum
property InputTransformType
class nornir_volumemodel.model.transform.Transform(**kwargs)[source]

Bases: FileResource, InputTransformPropertySet

Represents a file on disk with hashable amount of data

Created on Apr 11, 2014

@author: u0490822

class nornir_volumemodel.model.base_classes.DirectoryResource[source]

Bases: ExternalResource

class nornir_volumemodel.model.base_classes.ExternalResource[source]

Bases: ModelBase

Properties of objects whose data is stored outside the object file structure, such as on a file system

property FullPath
property Parent
property Path
property RelativePath

Relative path from volume root

class nornir_volumemodel.model.base_classes.FileResource[source]

Bases: ExternalResource

Represents a file

property Checksum
property Type
class nornir_volumemodel.model.base_classes.ModelBase[source]

Bases: object

Properties common to all volume objects

property Version
class nornir_volumemodel.model.base_classes.Named[source]

Bases: object

Object that contains other objects. Path always refers to a directory

property Name
class nornir_volumemodel.model.base_classes.Numbered[source]

Bases: object

Object that contains other objects. Path always refers to a directory

property Number

Created on Apr 11, 2014

@author: u0490822

nornir_volumemodel.persistance.nornir_xml.main.ChildElementObjects(elem, parent_full_path)[source]
nornir_volumemodel.persistance.nornir_xml.main.GetModelLoadFuncFromTag(tag)[source]
nornir_volumemodel.persistance.nornir_xml.main.Load(VolumePath, Create=False, UseCache=True)[source]

Load the volume information for the specified directory or create one if it doesn’t exist

nornir_volumemodel.persistance.nornir_xml.main.LoadModelObjectFromXmlPath(fullpath)[source]
nornir_volumemodel.persistance.nornir_xml.main.LoadXmlElementFromPath(fullpath)[source]

Returns root xml element from xml file at fullpath

nornir_volumemodel.persistance.nornir_xml.main.ModelFromXMLElement(Element, ElementPath)[source]
nornir_volumemodel.persistance.nornir_xml.main.Save(XMLPath)[source]