IMcViewSequenceFrameRange Property
|
|
The range(s) of frames to be displayed during sequence play or stepping.
Namespace:
MediaCy.IQL.Display.Viewer
Assembly:
MediaCy.IQL.Display.Viewer (in MediaCy.IQL.Display.Viewer.dll) Version: 10.0.6912.0
SyntaxProperty SequenceFrameRange As Object
Get
Set
Property Value
Type:
Object
RemarksAll sequence operations are limited to the frames in the SequenceFrameRange.
That is, while the FrameToDisplay property may be directly set to any frame
index from 0 through ImageToDisplay.FrameCount-1, SequencePlayForward, SequencePlayBackward,
SequenceStepForward and SequenceStepBackward will set the FrameToDisplay only
from the SequenceFrameRange. Of course, by default the SequenceFrameRange
is all ImageToDisplay frames.
The SequenceFrameRange property is exposed as VARIANT which may contain a 1D array of the
FrameIndex values of the selected frames. If all frames are selected
(because an Empty, Missing or scalar -1 VARIANT was assigned as the
SequenceFrameRange), then a scalar -1 is returned to indicate that all frames are
selected for processing in their natural order.
On assignment, you specify the frames to be active by supplying an IMcFrames
collection, by supplying one or more IMcFrame instances or by supplying FrameIndex
values of the frames to be active. The source selector for an SequenceFrameRange
assignment can be Empty or Missing VARIANT or a scalar value of -1 indicating
that all frames are active. The selector may be an array of VARIANT, in which
case the contents of each VARIANT are added to the SequenceFrameRange. Each
VARIANT may be a single scalar index value (if negative, then all frames are
added), or it may be a single scalar LONGRANGE giving Start and End frame
indices, or it may be an array of index values or an array of LONGRANGE index
ranges. In addition, it may be an IMcFrame object instance or an array of them;
each of these IMcFrame instances must one of the frames in this IMcImage's frame
list (see the Frame property). Finally, the assigning selector may be an
IMcFrames collection (or an array of them) with a ParentImage the same as this
the ImageToDisplay. In this case the entire contents of the IMcFrames collection(s) are added
to the SequenceFrameRange.
If this McView instance is the McWindow.View property of the
McApplication.ActiveWindow, then the ImageToDisplay.ActiveFrameRange will follow
an assignment to SequenceFrameRange (see Example 1). Likewise (see Example 2), an
assignment to ThisApplication.ActiveImage.ActiveFrameRange will set the
ActiveWindow.View.SequenceFrameRange (but not that of any other McWindow's
showing the ActiveImage).
Note |
---|
On assigment a PropertyChanged(ID_MV_SequenceFrameRange) event is fired.
The SequenceFrameRange property can be used as the FrameSelector argument to the
ImageToDisplay.Frames property to get an McFrames instance holding the active frames.
If a frame in the SequenceFrameRange is moved to another image (via
McImage.MoveFrames) or is removed from the image altogether (via
McImage.RemoveFrames), then that frame is automatically removed from the
SequenceFrameRange. When this happens, the FrameIndex of remaining frames is
likely to change. |
Examples
Dim rngA As LONGRANGE
rngA.Start = 1
rngA.End = 3
Dim rngB As LONGRANGE
rngB.Start = 6
rngB.End = 5
Dim rngArray(0 To 1) As LONGRANGE
rngArray(0) = rngA
rngArray(1) = rngB
Dim wnd As McWindow=ThisApplication.ActiveWindow
wnd.ImageView.SequenceFrameRange = rngArray
Debug.Print "AFR= " & ThisApplication.GlobalTools.McToText(ThisApplication.ActiveImage.ActiveFrameRange).Value & _
" AW.SFR= " & ThisApplication.GlobalTools.McToText(wnd.ImageView.SequenceFrameRange).Value
Dim rngC As LONGRANGE
rngC.Start = 10
rngC.End = 20
ThisApplication.ActiveImage.ActiveFrameRange = rngC
Debug.Print "AFR= " & ThisApplication.GlobalTools.McToText(ThisApplication.ActiveImage.ActiveFrameRange).Value & _
" AW.SFR= " & ThisApplication.GlobalTools.McToText(wnd.ImageView.SequenceFrameRange).Value
See AlsoReference
ActiveFrameRange