Click or drag to resize

IMcImageSetAddImage Method

Add the frames of an image to the specified position

Namespace:  MediaCy.IQL.Sets
Assembly:  MediaCy.IQL.Sets (in MediaCy.IQL.Sets.dll) Version: 10.0.6912.0
Syntax
VB
Sub AddImage ( 
	ImageOrFile As Object,
	Organization As McImageSetExtents,
	Location As McImageSetLocations
)

Parameters

ImageOrFile
Type: SystemObject
If a string, or vector of strings, the image file(s) to add. Otherwise this may be a McFrame or McImage instance or an array of such instances. Only the ActiveFrameRange of the source McImage(s) will be added to the data set if the McImage.UseActiveFrameRange property is true. If the McImage.UseActiveFrameRange property is false, then only the ActiveFrame of that source image is added to the data set. Organization: The organization of the frames within the image as a McImageSetExtents collection of McImageSetExtent instances. The first element in the collection identifies the type and gives the length of the fastest moving dimension, followed by the types and lengths of any progressively slower moving dimensions. The product of the Organization dimension lengths must match the total number of frames supplied by the ImageOrFile argument, taking ActiveFrameRange(s) into account. Location: The set location at which to add the image.
Organization
Type: MediaCy.IQL.SetsMcImageSetExtents
Location
Type: MediaCy.IQL.SetsMcImageSetLocations
Remarks
Adds the supplied image to the specified position. The image can be specified as a McImage that is open in the application, or as the image file containing the frames. When the image is specified as a McImage, the image's ActiveFrameRange will be added to the set Since the image can contain multiple frames, the Organization parameter must be used to indicate the organization (i.e., the order and length of dimensions) of those frames. As illustrated in the example, the dimension that varies the most rapidly should be the first dimension specified in the organization collection, followed by the dimension that varies next most rapidly, etc.
Examples
VB
Sub CreateSetFromImage()
Dim aSet As McImageSet
' Note: Sample set file must be loaded, to start with just PollenGreen.seq
If ThisApplication.ActiveImage Is Nothing Then
MsgBox "Please open the PollenGreen.seq image file"
Exit Sub
End If
If ThisApplication.ActiveImage.FrameCount <> 48 Then
MsgBox "Please open the PollenGreen.seq image file"
Exit Sub
End If
Set aSet = ImageSets.Add("SampleSet")
aSet.Experimenter = "IQ user"
aSet.Description = "This is a sample set of 3 pollen grains, taken as follows:" + vbCrLf + "  16 Z positions " + vbCrLf + "  repeated for each of " + vbCrLf + "   3 sites (the X/Y location of the grains) by" + vbCrLf + "   4 channels (R, G, B, and color composite)"
' first, let's define the organization, in the order that the dimensions exist in the image
Dim theOrg As New McImageSetExtents
theOrg.Add mcisdZ, 16       ' 16 Z positions repeated for each of
theOrg.Add mcisdSite, 3     ' 3 sites
Dim theLoc As New McImageSetLocations
' we can leave this empty when adding the first image (each dimension uses a default location of IMAGESET_POSITION_AT_END)
aSet.AddImage ActiveImage, theOrg, theLoc
End Sub
See Also