Click or drag to resize

IMcImageFromPointsValues Property

Sets/gets point values (intensities).

Namespace:  MediaCy.IQL.Operations
Assembly:  MediaCy.IQL.Operations (in MediaCy.IQL.Operations.dll) Version: 10.0.6912.0
Syntax
VB
Property Values ( 
	Optional lChannel As Integer = -1,
	Optional Index As Integer = -1
) As Object
	Get
	Set

Parameters

lChannel (Optional)
Type: SystemInt32
channel index
Index (Optional)
Type: SystemInt32

Property Value

Type: Object
Remarks
The values can be 2D or 1D array of values or singular values. The values are returned as double type. If both lChannel and lIndex are missed, the 2D array of values is set. The structure of VB array must be Values2D(NChannels - 1, NPoints - 1). If lIndex is missed, the values for all channels for the given point defined by lChannel will be set as Values1D(NPoints - 1). The user-defined values are used only when eSourceType in CreateImage is set to mcfpsValues.
Examples
VB
Sub SetValues()
Dim NChannels As Long, NPoints As Long, i, j
Dim Values2D() As Double
NChannels = 3
NPoints = 10
ReDim Values2D(NChannels - 1, NPoints - 1) As Double
For i = 0 To NChannels - 1
For j = 0 To NPoints - 1
Values2D(i, j) = (i + 1) * 100 + j + 1
Next j
Next i
'set values as 2D array
ThisApplication.ActiveImage.ImageFromPoints.Values = Values2D
'check values
Debug.Print McToText(ActiveImage.ImageFromPoints.Values)
Debug.Print McToText(ActiveImage.ImageFromPoints.Values(0))
Debug.Print McToText(ActiveImage.ImageFromPoints.Values(1, 1))
'method 2
Dim Values1D() As Double
ReDim Values1D(NPoints - 1) As Double
For i = 0 To NChannels - 1
For j = 0 To NPoints - 1
Values1D(j) = (i + 1) * 100 + j + 1
ThisApplication.ActiveImage.ImageFromPoints.Values(i) = Values1D
Next j
Next i
Debug.Print McToText(ActiveImage.ImageFromPoints.Values)
Debug.Print McToText(ActiveImage.ImageFromPoints.Values(0))
'method 3
For i = 0 To NChannels - 1
For j = 0 To NPoints - 1
ThisApplication.ActiveImage.ImageFromPoints.Values(i, j) = (i + 1) * 100 + j + 1
Next j
Next i
Debug.Print McToText(ActiveImage.ImageFromPoints.Values)
Debug.Print McToText(ActiveImage.ImageFromPoints.Values(0))
End Sub
See Also