Document metadata

Application name

CSK_Module_MultiColorSelection

Version

3.0.0

Date

2024-08-14

Author

SICK AG

Crowns

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

CSK_MultiColorSelection.addInstance()
Short description

Function to add an additional instance.

Sample (auto-generated)
CSK_MultiColorSelection.addInstance()
CSK_MultiColorSelection.addMaskingROI()
Short description

Function to add a mask for currently selected color.

Sample (auto-generated)
CSK_MultiColorSelection.addMaskingROI()
CSK_MultiColorSelection.clearFlowConfigRelevantConfiguration()
Short description

Function to clear FlowConfig relevant configurations.

Sample (auto-generated)
CSK_MultiColorSelection.clearFlowConfigRelevantConfiguration()
CSK_MultiColorSelection.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()
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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()
CSK_MultiColorSelection.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()
CSK_MultiColorSelection.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()
CSK_MultiColorSelection.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
Image

1

Image to process.

Return values
Name Type Multiplicity Description

result

BOOL

?

Result

Sample (auto-generated)
result = CSK_MultiColorSelection.processInstanceNUM(image)
CSK_MultiColorSelection.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()
CSK_MultiColorSelection.resetMask()
Short description

Function to reset the configured masks to only a single mask.

Sample (auto-generated)
CSK_MultiColorSelection.resetMask()
CSK_MultiColorSelection.resetModule()
Short description

Function to reset main configuration of module.

Sample (auto-generated)
CSK_MultiColorSelection.resetModule()
CSK_MultiColorSelection.resetROI()
Short description

Function to reset the configured ROI.

Sample (auto-generated)
CSK_MultiColorSelection.resetROI()
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.setColorMode()
Short description

Function to set color mode (if color should be checked or only gray values).

Parameters
Name Type Multiplicity Description

mode

ENUM
CSK_MultiColorSelection.ColorMode

1

Mode to use.

Sample (auto-generated)
CSK_MultiColorSelection.setColorMode(mode)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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)
See also setColorMode().

Sample (auto-generated)
CSK_MultiColorSelection.setColorValue(value)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.setMaskingROIType()
Short description

Function to set type of mask(s).

Parameters
Name Type Multiplicity Description

roiType

ENUM
CSK_MultiColorSelection.ROI_Type

1

Type

Sample (auto-generated)
CSK_MultiColorSelection.setMaskingROIType(roiType)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.setPreFilterAOIChannel()
Short description

Set image channel (HSV) to be used for prefiltering of AOI.

Parameters
Name Type Multiplicity Description

channel

ENUM
CSK_MultiColorSelection.ImageChannel

1

Channel

Sample (auto-generated)
CSK_MultiColorSelection.setPreFilterAOIChannel(channel)
CSK_MultiColorSelection.setPreFilterAOIRange()
Short description

Range to be used for prefiltering AOI.

Parameters
Name Type Multiplicity Description

values

INT

+

Range (depends on used HSV channel)
Hue: 0 - 179
Saturation: 0 - 255
Value: 0 - 255.

Sample (auto-generated)
CSK_MultiColorSelection.setPreFilterAOIRange(values)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.setPreFilterAONIChannel()
Short description

Set image channel (HSV) to be used for prefiltering of AONI.

Parameters
Name Type Multiplicity Description

channel

ENUM
CSK_MultiColorSelection.ImageChannel

1

Channel

Sample (auto-generated)
CSK_MultiColorSelection.setPreFilterAONIChannel(channel)
CSK_MultiColorSelection.setPreFilterAONIRange()
Short description

Range to be used for prefiltering AONI.

Parameters
Name Type Multiplicity Description

values

INT

+

Range (depends on used HSV channel)
Hue: 0 - 179
Saturation: 0 - 255
Value: 0 - 255

Sample (auto-generated)
CSK_MultiColorSelection.setPreFilterAONIRange(values)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.setResultOutput()
Short description

Function to select modus to forward results via event OnNewResult / OnNewResultNUM.

Parameters
Name Type Multiplicity Description

mode

ENUM
CSK_MultiColorSelection.ResultOutputMode

1

Result output mode.

Sample (auto-generated)
CSK_MultiColorSelection.setResultOutput(mode)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.setROIType()
Short description

Function to set the type of ROI.

Parameters
Name Type Multiplicity Description

roiType

ENUM
CSK_MultiColorSelection.ROI_Type

1

Type

Sample (auto-generated)
CSK_MultiColorSelection.setROIType(roiType)
CSK_MultiColorSelection.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)
1: Pre-Filter Area of interest
2: Pre-Filter Area of NON interest
3: Visualize image content of interest (to check)
4 Object definition
5: Processing

Sample (auto-generated)
CSK_MultiColorSelection.setSelectedStep(step)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.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)
CSK_MultiColorSelection.setShowImageChannel()
Short description

Set image channel to show in UI (HSV).

Parameters
Name Type Multiplicity Description

channel

ENUM
CSK_MultiColorSelection.ImageChannel

1

Channel

Sample (auto-generated)
CSK_MultiColorSelection.setShowImageChannel(channel)

Events

CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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")
CSK_MultiColorSelection.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.

Functions

MultiColorSelection_FC.ImageSource.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)
MultiColorSelection_FC.ImageSource.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.

Functions

MultiColorSelection_FC.OnNewResult.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

ENUM
MultiColorSelection_FC.ResultType

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)
MultiColorSelection_FC.OnNewResult.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

MultiColorSelection_FC.OnNewResult.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.

Overview

Functions

MultiColorSelection_FC.Process.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

ENUM
MultiColorSelection_FC.ResultType

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)
MultiColorSelection_FC.Process.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

CSK_MultiColorSelection.ColorMode

Image type to process.

Items
Value Name Description
Color

Color

Color mode.

Grey

Grey

Grey value mode.

CSK_MultiColorSelection.ImageChannel

HSV Image Channel

Items
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.

Items
Value Name Description
Circle

Circle

Circle

Rectangle

Rectangle

Rectangle

CSK_MultiColorSelection.ResultOutputMode

Content of result.

Items
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.

Items
Value Name Description
TOTAL_SUBRESULTS

TOTAL_SUBRESULTS

TotalResult + optional sub results (see 'setResultOutput') concatenated as a string.

TOTAL_RESULT

TOTAL_RESULT

TotalResult as boolean.