nornir_volumecontroller API
- nornir_volumecontroller.CreateVolumeController(vol_model)[source]
Given a volume model create a controller for the model
- class nornir_volumecontroller.Volume(volumeModel=None)[source]
Bases:
VolumeInterfaceConcrete volume controller wrapping a
Volumemodel.Lazily builds per-section transform maps and channel lists on first access so loading a large volume does not incur upfront I/O costs.
- property Bounds
Bounding box of the entire volume :return: (minZ, minY, minX, maxZ, maxY, maxX)
- property Channels
List of all channels in the volume
- GetData(region, resolution, channel_names)[source]
Return data for the specified region :param ndarray region: (minZ, minY, minX, maxZ, maxY, maxX) :param float resolution: resolution of output data :param list channels: channels to include in output :returns: list of ndarray images
- GetHighestResolution(region=None, channel_names=None)[source]
Return the highest resolution of data within the bounding box
- property Name
- property transform_path_map
- class nornir_volumecontroller.base_objects.Scale(scale_model=None)[source]
Bases:
objectPhysical scale of a volume channel on each spatial axis (units per pixel).
Wraps the volumemodel
Scaleobject so callers can readX,Y, andZunits-per-pixel as plain floats rather than navigating the model hierarchy.- classmethod MinAxisScales(scale_model_A, scale_model_B)[source]
Given two scale models, return a scale object describing the highest resolution available for each axis
- property X
- property Y
- property Z
- class nornir_volumecontroller.base_objects.Volume(volumeModel=None)[source]
Bases:
VolumeInterfaceConcrete volume controller wrapping a
Volumemodel.Lazily builds per-section transform maps and channel lists on first access so loading a large volume does not incur upfront I/O costs.
- property Bounds
Bounding box of the entire volume :return: (minZ, minY, minX, maxZ, maxY, maxX)
- property Channels
List of all channels in the volume
- GetData(region, resolution, channel_names)[source]
Return data for the specified region :param ndarray region: (minZ, minY, minX, maxZ, maxY, maxX) :param float resolution: resolution of output data :param list channels: channels to include in output :returns: list of ndarray images
- GetHighestResolution(region=None, channel_names=None)[source]
Return the highest resolution of data within the bounding box
- property Name
- property transform_path_map
- class nornir_volumecontroller.base_objects.VolumeInterface[source]
Bases:
objectAbstract interface for any volume controller.
Concrete subclasses (e.g.
Volume) must implementBounds,Channels, andGetData().- property Bounds
Bounding box of the entire volume
- property Channels
List of all channels available in the volume
- GetData(region, resolution, channels)[source]
Get the raw data inside the boundaries :param box region: Data within the region is returned :param ndarray resolution: The resolution to return data in :param list channels: List of channels to assign to the output array :returns: 4D Matrix with Channel,Z,Y,X axes :rtype: ndarray
- class nornir_volumecontroller.base_objects.VolumeRegisteredChannel(channelModel=None)[source]
Bases:
objectWraps a single imaging channel together with its channel-to-volume registration transform.
Provides convenient access to the channel’s
Name,Scale, and tile-pyramid file paths at a given downsample level.- property Name
- property Scale
- property Transform
Created on Apr 10, 2014
@author: u0490822
- nornir_volumecontroller.factory.CreateVolumeController(vol_model)[source]
Given a volume model create a controller for the model
- nornir_volumecontroller.spatial.BuildSectionChannelMap(section)[source]
Build a mapping from channel name to
VolumeRegisteredChannelfor one section.Only channels that have a
ChannelToVolumetransform are included.
- nornir_volumecontroller.spatial.BuildVolumeTransformMap(volume)[source]
Build a two-level map from section number → channel name →
VolumeRegisteredChannel.Only sections that contain at least one channel with a
ChannelToVolumetransform are included.
- nornir_volumecontroller.spatial.SectionsInBoundingBox(boundingbox)[source]
Yield every integer section number whose Z-coordinate falls within boundingbox.
- Parameters:
boundingbox – A bounding-box object with a
BoundingBoxattribute indexed bynornir_imageregistration.iBoxconstants.- Yields:
int — section numbers from
MinZtoMaxZinclusive.