Description

Optimizes large frame access by specifying how the ROI will be traversed.

Property type

A mcTraversalMode enumeration.  

Syntax

object.TraversalMode [= value]

The TraversalMode Property syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McRegionAccess.
valueA mcTraversalMode enumeration, as described in settings.

Settings

The settings for value are:

ConstantValueDescription
 mctmUnspecified0

Caller has not specified the traversal mode. Top to bottom traversal is mildly favored, though not assumed to be the only type of traversal. This is the default state of the McRegionAccess.TraversalMode property.

 mctmTopToBottom1

The region access will be traversed from top to bottom (smaller Y to larger Y values) exclusively. Setting McRegionAccess.TraversalMode to this value will strongly favor keeping image lines below the currently accessed line in memory.

 mctmBottomToTop2

The region access will be traversed from bottom to top (larger Y to smaller Y values) exclusively. Setting McRegionAccess.TraversalMode to this value will strongly favor keeping image lines above the currently accessed line in memory.

 mctmBiDirectional3

Traversal will not consistently be in one direction, or is expected to repeatedly traverse a section of lines. For example, this would normally be the appropriate McRegionAccess.TraversalMode for accessing the source image during an image-rotate operation. Setting McRegionAccess.TraversalMode to this value will favor equally keeping image lines above and below the currently accessed line in memory.

 mctmRandom4

No consitent traversal is expected. For example, this would normally be the appropriate McRegionAccess.TraversalMode for accessing the source image to find the intensity at a point marked by the user. Setting McRegionAccess.TraversalMode to this value will avoid trying to load more that the minimum necessary section of a frame in memory.

 mctmMultipassFlag32768

If this flag is OR'ed into the TraversalMode value, the McRegionAccess ROI is expected to be traversed multiple times. In this case, an extra effort is made to keep the entire McRegionAccess ROI in memory, if possible. This flag is not set in the McRegionAccess.TraversalMode property by default, since the vast majority of uses of an McRegionAccess instance involve a single traversal of the McRegionAccess ROI.

Remarks

For McRegionAccess instances with a very large ROI (ones that require memory storage larger than the McPixelBuffer.MemoryAutoLockLimit), it may not be possible to keep all of the McRegionAccess ROI in memory during all of the accesses required for an entire algorithm.

By default, the TraversalMode property is set to mctmUnspecified, which optimizes for a single, mostly top-to-bottom (smaller to larger Y) traversal of the ROI.