Document metadata
Application name |
CSK_Module_MultiColorSelection |
---|---|
Version |
3.0.0 |
Date |
2024-08-14 |
Author |
SICK AG |
Crowns
- C
- M
CSK_Module_MultiColorSelection
Short description
This is an automatically generated CROWN (description not necessary).
Overview
CSK_MultiColorSelection
Short description
Module to provide color selection functionality. Multiple instances can be created and will run in multiple threads on the device.
This module provides a UI for all relevant features.
Typically to configure this module to work with other modules you should do this:
1) If multiple instances are needed, these can be added via addInstance().
2) Select the instance you want to configur via setInstance().
3) Set the event providing the images to be processed e.g. via setRegisterEvent('CSK_ImagePlayer.OnNewImage').
4) Other modules can react on the results of this module (see OnNewResultNUM and setResultOutput).
Overview
Functions
addInstance()
Short description
Function to add an additional instance.
Sample (auto-generated)
CSK_MultiColorSelection.addInstance()
addMaskingROI()
Short description
Function to add a mask for currently selected color.
Sample (auto-generated)
CSK_MultiColorSelection.addMaskingROI()
clearFlowConfigRelevantConfiguration()
Short description
Function to clear FlowConfig relevant configurations.
Sample (auto-generated)
CSK_MultiColorSelection.clearFlowConfigRelevantConfiguration()
getInstancesAmount()
Short description
Get amount of created color selection instances.
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
amount |
INT |
1 |
Amount |
Sample (auto-generated)
amount = CSK_MultiColorSelection.getInstancesAmount()
getParameters()
Short description
Function to get all parameters of the client in JSON format.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
instanceNo |
INT |
1 |
Number of instance to get parameters from. |
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
jsonParameters |
STRING |
1 |
JSON string with all parameters. |
Sample (auto-generated)
jsonParameters = CSK_MultiColorSelection.getParameters(instanceNo)
getStatusModuleActive()
Short description
Function to get status if module is active.
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
status = CSK_MultiColorSelection.getStatusModuleActive()
loadParameters()
Short description
Load parameters for this module from the CSK_PersistentData module if possible and use them.
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
success |
BOOL |
1 |
Success to load parameters. |
Sample (auto-generated)
success = CSK_MultiColorSelection.loadParameters()
pageCalled()
Short description
Function to register "OnResume" of the module UI (only as helper function).
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
empty |
STRING |
1 |
Empty string (only needed to simplify binding). |
Sample (auto-generated)
empty = CSK_MultiColorSelection.pageCalled()
processInstanceNUM()
Short description
Example of dynamically served function to process color selection.
NUM will be replaced by the number of instance (e.g. "processInstance1").
INFO: Other modules can check via "Script.isServedAsFunction" if function of sepecific instance exists.
Needs then to be called via "Script.callFunction".
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
image |
OBJECT |
1 |
Image to process. |
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
result |
BOOL |
? |
Result |
Sample (auto-generated)
result = CSK_MultiColorSelection.processInstanceNUM(image)
resetInstances()
Short description
Function to reset instances to one single instance.
IMPORTANT: As instances start their own threads, the module needs to be restarted if new instances are needed… (see AppEngine docu for "Script.startScript").
Sample (auto-generated)
CSK_MultiColorSelection.resetInstances()
resetMask()
Short description
Function to reset the configured masks to only a single mask.
Sample (auto-generated)
CSK_MultiColorSelection.resetMask()
resetModule()
Short description
Function to reset main configuration of module.
Sample (auto-generated)
CSK_MultiColorSelection.resetModule()
resetROI()
Short description
Function to reset the configured ROI.
Sample (auto-generated)
CSK_MultiColorSelection.resetROI()
sendParameters()
Short description
Send parameters to CSK_PersistentData module if possible to save them.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
noDataSave |
BOOL |
? |
[Optional] Set to TRUE if the data should NOT be saved immediately after sending. |
Sample (auto-generated)
CSK_MultiColorSelection.sendParameters(noDataSave)
setColorActive()
Short description
Set if color object is active.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiColorSelection.setColorActive(status)
setColorMode()
Short description
Function to set color mode (if color should be checked or only gray values).
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
mode |
1 |
Mode to use. |
Sample (auto-generated)
CSK_MultiColorSelection.setColorMode(mode)
setColorObject()
Short description
Select color object.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
selection |
INT |
1 |
Color object to select. |
Sample (auto-generated)
CSK_MultiColorSelection.setColorObject(selection)
setColorTolerance()
Short description
Function to set color tolerance to detect color. (Will extend the color value in both directions).
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
value |
INT |
1 |
Tolerance |
Sample (auto-generated)
CSK_MultiColorSelection.setColorTolerance(value)
setColorValue()
Short description
Function so set the color value.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
value |
INT |
1 |
Color value ([0-179] for colors and [0-255] for grey values) |
Sample (auto-generated)
CSK_MultiColorSelection.setColorValue(value)
setFlowConfigPriority()
Short description
Function to configure if FlowConfig should have priority for FlowConfig relevant configuration.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiColorSelection.setFlowConfigPriority(status)
setInstance()
Short description
Set instance to select (e.g. for further configurations on its parameters).
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
instance |
INT |
1 |
Single instance to select. |
Sample (auto-generated)
CSK_MultiColorSelection.setInstance(instance)
setLoadOnReboot()
Short description
Configure if this module should load its saved parameters at app/device boot up.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiColorSelection.setLoadOnReboot(status)
setMaskEditor()
Short description
Set status of mask editor for selected color.
If TRUE, the viewer in the UI will install an editor for the mask(s).
If FALSE it will update the masks accordingly.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiColorSelection.setMaskEditor(status)
setMaskingROIActive()
Short description
Function to select if currently selected color should use mask(s) to ignore areas of the image for the color selection processing.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiColorSelection.setMaskingROIActive(status)
setMaskingROIType()
Short description
Function to set type of mask(s).
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
roiType |
1 |
Type |
Sample (auto-generated)
CSK_MultiColorSelection.setMaskingROIType(roiType)
setMaxBlobSize()
Short description
Function to set maximum size of blob(s) to find.
Value is in 'px' or 'mm²'. See also setPixelRefactor()…
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
size |
INT |
1 |
Size |
Sample (auto-generated)
CSK_MultiColorSelection.setMaxBlobSize(size)
setMaxGood()
Short description
Function to set the maximum amount of blobs allowed to be found in the image for a good measurement.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
value |
INT |
1 |
Maximum amount of blobs. |
Sample (auto-generated)
CSK_MultiColorSelection.setMaxGood(value)
setMinBlobSize()
Short description
Function to set minimum size of blob(s) to find.
Value is in 'px' or 'mm²'. See also setPixelRefactor()…
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
size |
INT |
1 |
Size |
Sample (auto-generated)
CSK_MultiColorSelection.setMinBlobSize(size)
setMinGood()
Short description
Function to set the minimum amount of blobs needed to be found in the image for a good measurement.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
value |
INT |
1 |
Minimum amount of blobs. |
Sample (auto-generated)
CSK_MultiColorSelection.setMinGood(value)
setObjectName()
Short description
Function to specify a name for the currently selected color (e.g. 'blue pins').
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
name |
STRING |
1 |
Name |
Sample (auto-generated)
CSK_MultiColorSelection.setObjectName(name)
setParameterName()
Short description
Function to set the name of the parameters if saved/loaded via the CSK_PersistentData module.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
name |
STRING |
1 |
Name of the parameter. |
Sample (auto-generated)
CSK_MultiColorSelection.setParameterName(name)
setPipetteEditorActive()
Short description
Set status of pipette editor for selected color.
If TRUE, the viewer in the UI will install an editor for the pipette inside of the viewer to deifne an area within the image.
If FALSE it will calculate the mean value of the defined area to be used for the color value.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiColorSelection.setPipetteEditorActive(status)
setPixelRefactor()
Short description
Function to set the factor to calculate mm² out of pixels.
Pixel values will be divided by this value.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
value |
FLOAT |
1 |
Factor |
Sample (auto-generated)
CSK_MultiColorSelection.setPixelRefactor(value)
setPixelRefactorActive()
Short description
Function to select if the px size values of found blobs should be recalculated to mm².
See also setPixelRefactor()
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiColorSelection.setPixelRefactorActive(status)
setPreFilterAOIActive()
Short description
Set if prefilter for AOI (area of interest) should be used.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiColorSelection.setPreFilterAOIActive(status)
setPreFilterAOIChannel()
Short description
Set image channel (HSV) to be used for prefiltering of AOI.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
channel |
1 |
Channel |
Sample (auto-generated)
CSK_MultiColorSelection.setPreFilterAOIChannel(channel)
setPreFilterAOIRange()
Short description
Range to be used for prefiltering AOI.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
values |
INT |
+ |
Range (depends on used HSV channel) |
Sample (auto-generated)
CSK_MultiColorSelection.setPreFilterAOIRange(values)
setPreFilterAONIActive()
Short description
Set if prefilter for AONI (area of non interest) should be used.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiColorSelection.setPreFilterAONIActive(status)
setPreFilterAONIChannel()
Short description
Set image channel (HSV) to be used for prefiltering of AONI.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
channel |
1 |
Channel |
Sample (auto-generated)
CSK_MultiColorSelection.setPreFilterAONIChannel(channel)
setPreFilterAONIRange()
Short description
Range to be used for prefiltering AONI.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
values |
INT |
+ |
Range (depends on used HSV channel) |
Sample (auto-generated)
CSK_MultiColorSelection.setPreFilterAONIRange(values)
setRegisterEvent()
Short description
Set event to listen for incoming images to process. Will be set for currently selected instance (see "setSelectedObject").
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
event |
STRING |
1 |
Event name to register to ( e.g. CSK_ImagePlayer.OnNewImage). |
Sample (auto-generated)
CSK_MultiColorSelection.setRegisterEvent(event)
setResultOutput()
Short description
Function to select modus to forward results via event OnNewResult / OnNewResultNUM.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
mode |
1 |
Result output mode. |
Sample (auto-generated)
CSK_MultiColorSelection.setResultOutput(mode)
setROIActive()
Short description
Function to select if color selection processing of currently selected color should only be done in a defined ROI.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiColorSelection.setROIActive(status)
setROIEditor()
Short description
Set status of ROI editor for selected color.
If TRUE, the viewer in the UI will install an editor for the ROI.
If FALSE it will update the masks accordingly.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiColorSelection.setROIEditor(status)
setROIType()
Short description
Function to set the type of ROI.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
roiType |
1 |
Type |
Sample (auto-generated)
CSK_MultiColorSelection.setROIType(roiType)
setSelectedStep()
Short description
Set processing step of the color selection (used for UI).
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
step |
STRING |
1 |
Processing step (1 of 5) |
Sample (auto-generated)
CSK_MultiColorSelection.setSelectedStep(step)
setShowAOI()
Short description
Set if result of active AOI (after prefiltering, Step3) should be shown in UI.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiColorSelection.setShowAOI(status)
setShowImage()
Short description
Function to select if image should be shown on UI.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiColorSelection.setShowImage(status)
setShowImageChannel()
Short description
Set image channel to show in UI (HSV).
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
channel |
1 |
Channel |
Sample (auto-generated)
CSK_MultiColorSelection.setShowImageChannel(channel)
Events
OnDataLoadedOnReboot
Short description
Event to call if module tried to load parameters and should be ready.
Sample (auto-generated)
function handleOnDataLoadedOnReboot()
-- Do something
end
Script.register("CSK_MultiColorSelection.OnDataLoadedOnReboot", "handleOnDataLoadedOnReboot")
OnMaskEditorActive
Short description
Notify current status of maskEditor.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnMaskEditorActive(status)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnMaskEditorActive", "handleOnMaskEditorActive")
OnNewColorMode
Short description
Notify current status of colorMode.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
mode |
STRING |
1 |
Mode ('Color' or 'Grey'). |
Sample (auto-generated)
function handleOnNewColorMode(mode)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewColorMode", "handleOnNewColorMode")
OnNewColorObjectSelection
Short description
Notify currently selected color object.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
selection |
INT |
1 |
No. of selected object. |
Sample (auto-generated)
function handleOnNewColorObjectSelection(selection)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewColorObjectSelection", "handleOnNewColorObjectSelection")
OnNewColorValue
Short description
Notify current color value of selected color object.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
colorValue |
INT |
1 |
Value |
Sample (auto-generated)
function handleOnNewColorValue(colorValue)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewColorValue", "handleOnNewColorValue")
OnNewFoundBlobs
Short description
Notify amount of found blobs.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
amount |
STRING |
1 |
Amount of found blobs. |
Sample (auto-generated)
function handleOnNewFoundBlobs(amount)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewFoundBlobs", "handleOnNewFoundBlobs")
OnNewImageQueue
Short description
Notify size of image queue.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
queueSize |
STRING |
1 |
Queue size. |
Sample (auto-generated)
function handleOnNewImageQueue(queueSize)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewImageQueue", "handleOnNewImageQueue")
OnNewInstanceList
Short description
Notify list of instances.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
list |
STRING |
1 |
List of instances |
Sample (auto-generated)
function handleOnNewInstanceList(list)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewInstanceList", "handleOnNewInstanceList")
OnNewMaskingROIType
Short description
Notify type of maskingROI.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
type |
STRING |
1 |
Type ('Rectangle' or 'Circle'). |
Sample (auto-generated)
function handleOnNewMaskingROIType(type)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewMaskingROIType", "handleOnNewMaskingROIType")
OnNewMaxBlobSize
Short description
Notify maximum allowed size of blobs to be found.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
size |
INT |
1 |
Size |
Sample (auto-generated)
function handleOnNewMaxBlobSize(size)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewMaxBlobSize", "handleOnNewMaxBlobSize")
OnNewMaxGood
Short description
Notify maximum allowed amount of blobs to be found.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
maxGood |
INT |
1 |
Maximum allowed amount. |
Sample (auto-generated)
function handleOnNewMaxGood(maxGood)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewMaxGood", "handleOnNewMaxGood")
OnNewMinBlobSize
Short description
Notify minimum of allowed size of blobs to be found.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
size |
INT |
1 |
Size |
Sample (auto-generated)
function handleOnNewMinBlobSize(size)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewMinBlobSize", "handleOnNewMinBlobSize")
OnNewMinGood
Short description
Notify minimum allowed amount of blobs to be found.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
minGood |
INT |
1 |
Minimum allowed amount. |
Sample (auto-generated)
function handleOnNewMinGood(minGood)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewMinGood", "handleOnNewMinGood")
OnNewObjectName
Short description
Notify object name of currently selected color object.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
name |
STRING |
1 |
Name |
Sample (auto-generated)
function handleOnNewObjectName(name)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewObjectName", "handleOnNewObjectName")
OnNewParameterName
Short description
Notify name of the parameters if saved/loaded via the CSK_PersistentData module for currently selected camera instance.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
parametersName |
STRING |
1 |
Name |
Sample (auto-generated)
function handleOnNewParameterName(parametersName)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewParameterName", "handleOnNewParameterName")
OnNewPixelRefactor
Short description
Notify currently used pixel refactor to calculate mm² out of pixels.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
refactor |
FLOAT |
1 |
Factor |
Sample (auto-generated)
function handleOnNewPixelRefactor(refactor)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewPixelRefactor", "handleOnNewPixelRefactor")
OnNewPixelRefactorUnit
Short description
Notify currently used unit for blobs.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
unit |
STRING |
1 |
Unit ('px' or 'mm²') |
Sample (auto-generated)
function handleOnNewPixelRefactorUnit(unit)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewPixelRefactorUnit", "handleOnNewPixelRefactorUnit")
OnNewPreFilterAOIChannel
Short description
Notify channel of prefiltering AOI.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
channel |
STRING |
1 |
Channel (Hue, Saturation or Value). |
Sample (auto-generated)
function handleOnNewPreFilterAOIChannel(channel)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewPreFilterAOIChannel", "handleOnNewPreFilterAOIChannel")
OnNewPreFilterAONIChannel
Short description
Notify channel of prefiltering AONI.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
channel |
STRING |
1 |
Channel (Hue, Saturation or Value). |
Sample (auto-generated)
function handleOnNewPreFilterAONIChannel(channel)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewPreFilterAONIChannel", "handleOnNewPreFilterAONIChannel")
OnNewProcessingParameter
Short description
Event to share processing parameters to the instances threads.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
objectNo |
INT |
1 |
Number of the instance to receive the parameter. |
parameter |
STRING |
1 |
Name of the parameter. |
value |
AUTO |
1 |
Value to set. |
colorObject |
INT |
? |
If parameter is for a specific colorObject, its number. |
Sample (auto-generated)
function handleOnNewProcessingParameter(objectNo, parameter, value, colorObject)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewProcessingParameter", "handleOnNewProcessingParameter")
OnNewProcessingTime
Short description
Notify processing time.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
time |
STRING |
1 |
Needed processing time in ms. |
Sample (auto-generated)
function handleOnNewProcessingTime(time)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewProcessingTime", "handleOnNewProcessingTime")
OnNewResult
Short description
Notify result of processing of currently selected instance. See also setResultOutput().
Will forward the result of currently selected instance. (see setInstance()).
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
result |
STRING |
1 |
Result |
Sample (auto-generated)
function handleOnNewResult(result)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewResult", "handleOnNewResult")
OnNewResultNUM
Short description
Example of dynamically created event to provide result of instance.
NUM will be replaced by the number of instance (e.g. "OnNewResult1").
INFO: Other modules can check via "Script.isServedAsEvent" if event of sepecific instance exists.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
result |
BOOL |
1 |
Total result. |
subResults |
STRING |
? |
Optional sub Results. See also setResultOutput(). |
timestamp |
INT |
? |
Optional timestamp. |
Sample (auto-generated)
function handleOnNewResultNUM(result, subResults, timestamp)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewResultNUM", "handleOnNewResultNUM")
OnNewResultOutput
Short description
Notify currently selected modus to forward results via event OnNewResult / OnNewResultNUM.
See setResultOutput().
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
mode |
STRING |
1 |
Mode |
Sample (auto-generated)
function handleOnNewResultOutput(mode)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewResultOutput", "handleOnNewResultOutput")
OnNewROIType
Short description
Notify type of ROI.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
type |
STRING |
1 |
Type ('Rectangle' or 'Circle'). |
Sample (auto-generated)
function handleOnNewROIType(type)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewROIType", "handleOnNewROIType")
OnNewSelectedInstance
Short description
Notify selected instance.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
selectedObject |
INT |
1 |
Selected instance |
Sample (auto-generated)
function handleOnNewSelectedInstance(selectedObject)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewSelectedInstance", "handleOnNewSelectedInstance")
OnNewSelectedStep
Short description
Notify selected processing step of this module.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
step |
STRING |
1 |
Step X of 5. |
Sample (auto-generated)
function handleOnNewSelectedStep(step)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewSelectedStep", "handleOnNewSelectedStep")
OnNewShowImageChannel
Short description
Notify image channel to use in UI viewer.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
channel |
STRING |
1 |
Channel (Hue, Saturation or Value). |
Sample (auto-generated)
function handleOnNewShowImageChannel(channel)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewShowImageChannel", "handleOnNewShowImageChannel")
OnNewSizeBiggestBlob
Short description
Notify size of biggest found blob within allowed range.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
size |
STRING |
1 |
Size |
Sample (auto-generated)
function handleOnNewSizeBiggestBlob(size)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewSizeBiggestBlob", "handleOnNewSizeBiggestBlob")
OnNewSizeSmallestBlob
Short description
Notify size of smallest found blob within allowed range.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
size |
STRING |
1 |
Size |
Sample (auto-generated)
function handleOnNewSizeSmallestBlob(size)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewSizeSmallestBlob", "handleOnNewSizeSmallestBlob")
OnNewStatusColorActive
Short description
Notify if currently selected color is active.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusColorActive(status)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewStatusColorActive", "handleOnNewStatusColorActive")
OnNewStatusCSKStyle
Short description
Notify UI style to use for CSK modules.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
theme |
STRING |
1 |
UI style |
Sample (auto-generated)
function handleOnNewStatusCSKStyle(theme)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewStatusCSKStyle", "handleOnNewStatusCSKStyle")
OnNewStatusFlowConfigPriority
Short description
Notify if FlowConfig should have priority for FlowConfig relevant configurations.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusFlowConfigPriority(status)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewStatusFlowConfigPriority", "handleOnNewStatusFlowConfigPriority")
OnNewStatusLoadParameterOnReboot
Short description
Notify status if parameters should be loaded on app/device boot up.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusLoadParameterOnReboot(status)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewStatusLoadParameterOnReboot", "handleOnNewStatusLoadParameterOnReboot")
OnNewStatusMaskActive
Short description
Notify if masks are active for currently selected color.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusMaskActive(status)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewStatusMaskActive", "handleOnNewStatusMaskActive")
OnNewStatusModuleIsActive
Short description
Notify if module can be used on device.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusModuleIsActive(status)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewStatusModuleIsActive", "handleOnNewStatusModuleIsActive")
OnNewStatusModuleVersion
Short description
Notify version of module.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
version |
STRING |
1 |
Version |
Sample (auto-generated)
function handleOnNewStatusModuleVersion(version)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewStatusModuleVersion", "handleOnNewStatusModuleVersion")
OnNewStatusPixelRefactorActive
Short description
Notify if refactoring pixels to mm² is active for currently selected color.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusPixelRefactorActive(status)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewStatusPixelRefactorActive", "handleOnNewStatusPixelRefactorActive")
OnNewStatusRegisteredEvent
Short description
Notify event instance is registered to receive new image to process.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
eventname |
STRING |
1 |
Name of event. |
Sample (auto-generated)
function handleOnNewStatusRegisteredEvent(eventname)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewStatusRegisteredEvent", "handleOnNewStatusRegisteredEvent")
OnNewStatusROIActive
Short description
Notify if ROI is active for currently selected color.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusROIActive(status)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewStatusROIActive", "handleOnNewStatusROIActive")
OnNewStatusShowImage
Short description
Notify if image should be showed in UI.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusShowImage(status)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewStatusShowImage", "handleOnNewStatusShowImage")
OnNewStringResultNUM
Short description
Example of dynamically created event to provide result of instance.
NUM will be replaced by the number of instance (e.g. "OnNewStringResult1").
INFO: Other modules can check via "Script.isServedAsEvent" if event of sepecific instance exists.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
result |
STRING |
1 |
Result in format 'Total result;sub results;timestamp'. |
Sample (auto-generated)
function handleOnNewStringResultNUM(result)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewStringResultNUM", "handleOnNewStringResultNUM")
OnNewTotalResult
Short description
Notify total result of currently selected instance.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
result |
BOOL |
1 |
Total result. |
Sample (auto-generated)
function handleOnNewTotalResult(result)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewTotalResult", "handleOnNewTotalResult")
OnNewValueToForwardNUM
Short description
Example of dynamically created event to Forward thread internal values to e.g. be notified with single event related to UI.
NUM will be replaced by the number of instance (e.g. "OnNewValueToForward1").
INFO: Other modules can check via "Script.isServedAsEvent" if event of sepecific instance exists.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
eventname |
STRING |
1 |
Eventname |
value |
AUTO |
1 |
Value to forward. |
Sample (auto-generated)
function handleOnNewValueToForwardNUM(eventname, value)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewValueToForwardNUM", "handleOnNewValueToForwardNUM")
OnNewValueTolerance
Short description
Notify tolerance value of currently selected color.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
tolerance |
INT |
1 |
Value |
Sample (auto-generated)
function handleOnNewValueTolerance(tolerance)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewValueTolerance", "handleOnNewValueTolerance")
OnNewValueUpdateNUM
Short description
Example of dynamically created event to forward thread internal values to main thread to keep values in sync between threads.
NUM will be replaced by the number of instance (e.g. "OnNewValueToForward1").
INFO: Other modules can check via "Script.isServedAsEvent" if event of sepecific instance exists.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
instance |
INT |
1 |
Instance value is related to. |
parameter |
STRING |
1 |
Parameter name to update. |
value |
AUTO |
1 |
Value to update. |
selectedObject |
INT |
? |
Optionally color object for the value update. |
Sample (auto-generated)
function handleOnNewValueUpdateNUM(instance, parameter, value, selectedObject)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewValueUpdateNUM", "handleOnNewValueUpdateNUM")
OnNewViewerID
Short description
Notify viewerID for viewer in UI for currently selected instance.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
id |
STRING |
1 |
ViewerID |
Sample (auto-generated)
function handleOnNewViewerID(id)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnNewViewerID", "handleOnNewViewerID")
OnPersistentDataModuleAvailable
Short description
Notify status if features of CSK_PersistentData module are available.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnPersistentDataModuleAvailable(status)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnPersistentDataModuleAvailable", "handleOnPersistentDataModuleAvailable")
OnPipetteActive
Short description
Notify if pipette mode is currently active in UI.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnPipetteActive(status)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnPipetteActive", "handleOnPipetteActive")
OnPreFilterAOIActive
Short description
Notify activation status of AOI prefilter.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
active |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnPreFilterAOIActive(active)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnPreFilterAOIActive", "handleOnPreFilterAOIActive")
OnPreFilterAOIValues
Short description
Notify values of AOI prefilter range.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
range |
INT |
+ |
Range |
Sample (auto-generated)
function handleOnPreFilterAOIValues(range)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnPreFilterAOIValues", "handleOnPreFilterAOIValues")
OnPreFilterAONIActive
Short description
Notify activation status of AONI prefilter.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnPreFilterAONIActive(status)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnPreFilterAONIActive", "handleOnPreFilterAONIActive")
OnPreFilterAONIValues
Short description
Notify values of AONI prefilter range.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
range |
INT |
+ |
Range |
Sample (auto-generated)
function handleOnPreFilterAONIValues(range)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnPreFilterAONIValues", "handleOnPreFilterAONIValues")
OnROIEditorActive
Short description
Notify if ROI editor is currently active in UI.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnROIEditorActive(status)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnROIEditorActive", "handleOnROIEditorActive")
OnShowAOI
Short description
Notify if AOI should be shown on UI.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnShowAOI(status)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnShowAOI", "handleOnShowAOI")
OnUserLevelAdminActive
Short description
Status of Admin userlevel. Used internally in combination with the CSK_UserManagement module if available.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status of Admin userlevel. |
Sample (auto-generated)
function handleOnUserLevelAdminActive(status)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnUserLevelAdminActive", "handleOnUserLevelAdminActive")
OnUserLevelMaintenanceActive
Short description
Status of Maintenance userlevel. Used internally in combination with the CSK_UserManagement module if available.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status of Maintenance userlevel. |
Sample (auto-generated)
function handleOnUserLevelMaintenanceActive(status)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnUserLevelMaintenanceActive", "handleOnUserLevelMaintenanceActive")
OnUserLevelOperatorActive
Short description
Status of Operator userlevel. Used internally in combination with the CSK_UserManagement module if available.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status of Operator userlevel. |
Sample (auto-generated)
function handleOnUserLevelOperatorActive(status)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnUserLevelOperatorActive", "handleOnUserLevelOperatorActive")
OnUserLevelServiceActive
Short description
Status of Service userlevel. Used internally in combination with the CSK_UserManagement module if available.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status of Service userlevel. |
Sample (auto-generated)
function handleOnUserLevelServiceActive(status)
-- Do something
end
Script.register("CSK_MultiColorSelection.OnUserLevelServiceActive", "handleOnUserLevelServiceActive")
MultiColorSelection_FC
Short description
Crown to provide CSK_FlowConfig relevant features.
Overview
MultiColorSelection_FC.ImageSource
Short description
Set source of incoming images to process.
Overview
Functions
create()
Short description
Internally used CSK_FlowConfig create function.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
Instance |
INT |
1 |
Numeric identifier of processing instance (must be >=1). |
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
Sample (auto-generated)
handle = MultiColorSelection_FC.ImageSource.create(Instance)
imageSource()
Short description
Set source of incoming images to process.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
imageSource |
STRING |
1 |
Image to process. Parameter: 1: image (IMAGE) 2: (optional) timestamp (INT) |
Sample (auto-generated)
MultiColorSelection_FC.ImageSource.imageSource(handle, imageSource)
MultiColorSelection_FC.OnNewResult
Short description
Provide result of color selection.
Overview
Functions
create()
Short description
Internally used CSK_FlowConfig create function.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
Instance |
INT |
1 |
Numeric identifier of processing instance (must be >=1). |
Mode |
1 |
Mode of result to provide. 'TOTAL_RESULT' = Provide total result of measurement 'TOTAL_SUBRESULTS' = Provide total result + sub results of measurement |
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
Sample (auto-generated)
handle = MultiColorSelection_FC.OnNewResult.create(Instance, Mode)
register()
Short description
Internally used CSK_FlowConfig register function.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
eventname |
STRING |
1 |
Internal parameter (not used). |
callback |
STRING |
1 |
Internally used callback function. |
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
success |
BOOL |
1 |
Success of register process. |
Sample (auto-generated)
success = MultiColorSelection_FC.OnNewResult.register(handle, eventname, callback)
Events
OnNewResult
Short description
Provide result of color selection.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
OnNewResult |
STRING |
1 |
'CSK_MultiColorSelection.OnNewStringResult[InstanceNUM]' or 'CSK_MultiColorSelection.OnNewResult[InstanceNUM]' (depends on selected mode). Parameter MODE = 'TOTAL_RESULT' 1: Total result (BOOL) 2: Subresult (STRING) 3: Timestamp (INT) MODE = 'TOTAL_SUBRESULTS' 1: Total result + optional sub results concatenated as a string (STRING) |
Sample (auto-generated)
function handleOnNewResult(handle, OnNewResult)
-- Do something
end
Script.register("MultiColorSelection_FC.OnNewResult.OnNewResult", "handleOnNewResult")
MultiColorSelection_FC.Process
Short description
Set source of image and provide result of processing.
Functions
create()
Short description
Internally used CSK_FlowConfig create function.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
Instance |
INT |
1 |
Numeric identifier of processing instance (must be >=1). |
Mode |
1 |
Mode of result to provide. 'TOTAL_RESULT' = Provide total result of measurement 'TOTAL_SUBRESULTS' = Provide total result + sub results of measurement |
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
Sample (auto-generated)
handle = MultiColorSelection_FC.Process.create(Instance, Mode)
process()
Short description
Set source of image and provide result of processing.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
imageSource |
STRING |
1 |
Image to process. Parameter: 1: image (IMAGE) 2: (optional) timestamp (INT) |
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
OnNewResult |
STRING |
1 |
'CSK_MultiColorSelection.OnNewStringResult[InstanceNUM]' or 'CSK_MultiColorSelection.OnNewResult[InstanceNUM]' (depends on selected mode). Parameter MODE = 'TOTAL_RESULT' 1: Total result (BOOL) 2: Subresult (STRING) 3: Timestamp (INT) MODE = 'TOTAL_SUBRESULTS' 1: Total result + optional sub results concatenated as a string (STRING) |
Sample (auto-generated)
OnNewResult = MultiColorSelection_FC.Process.process(handle, imageSource)
Enumerations
- C
- M
CSK_MultiColorSelection.ColorMode
Image type to process.
Value | Name | Description |
---|---|---|
Color |
Color |
Color mode. |
Grey |
Grey |
Grey value mode. |
CSK_MultiColorSelection.ImageChannel
HSV Image Channel
Value | Name | Description |
---|---|---|
Hue |
Hue |
Hue channel of the image. |
Value |
Value |
Value channel of the image. |
Saturation |
Saturation |
Saturation channel of the image. |
CSK_MultiColorSelection.ROI_Type
Type of ROI.
Value | Name | Description |
---|---|---|
Circle |
Circle |
Circle |
Rectangle |
Rectangle |
Rectangle |
CSK_MultiColorSelection.ResultOutputMode
Content of result.
Value | Name | Description |
---|---|---|
TOTAL |
TOTAL |
TOTAL: Forward only total result (e.g. TRUE). |
TOTAL+SUBRESULTS |
TOTAL_SUBRESULTS |
TOTAL+SUBRESULTS: Forward total result and subresutls (e.g. FALSE, TRUE, TRUE, FALSE). |
TOTAL+SUBVALUES |
TOTAL_SUBVALUES |
TOTAL+SUBVALUES: Forward total result and sub values (e.g. FALSE, 1,5,4). |
MultiColorSelection_FC.ResultType
Types of results to provide.
Value | Name | Description |
---|---|---|
TOTAL_SUBRESULTS |
TOTAL_SUBRESULTS |
TotalResult + optional sub results (see 'setResultOutput') concatenated as a string. |
TOTAL_RESULT |
TOTAL_RESULT |
TotalResult as boolean. |