| Home | | | Quick start | | | Cookbook | | | All symbols | | | Analytical index | | | Namespaces | | | Syntax | | | Statements | | | CX | | | Frequency | | | Functions | | | Examples | | | Examples by command |
Dialogs, image display, ROI picking, trackbars and user interaction.
Symbols in this namespace: 46
| Symbol | Kind | Category | Description |
|---|---|---|---|
GUI.CLEAR_ROI | Command | GUI interaction statements | Clears the current ROI from the selected image/stack window. |
GUI.CLOSE | Command | GUI interaction statements | Closes an image or stack window in the GUI MDI area. Without arguments it closes the active image/stack window. |
GUI.CONFIRM | Function | Hybrid GUI functions | Shows a Yes/No confirmation dialog and returns TRUE for Yes, FALSE for No. |
GUI.CREATE_TRACKBAR | Command | GUI interaction statements | Creates or updates a Qt slider similar in spirit to OpenCV createTrackbar. Read it with GUI.TRACKBAR_POS(). |
GUI.DRAWING | Function | Hybrid GUI functions | Generic drawing query. RECT/ROI/BOX returns [x,y,w,h]; POINT/CENTER/TOPLEFT/BOTTOMRIGHT returns [x,y]. |
GUI.GET_COLOR | Function | Hybrid GUI functions | Shows a QColorDialog::getColor-style dialog and returns the chosen color as #RRGGBB. Returns an empty string if the user cancels. |
GUI.GET_DRAWING | Function | Hybrid GUI functions | Generic drawing query. RECT/ROI/BOX returns [x,y,w,h]; POINT/CENTER/TOPLEFT/BOTTOMRIGHT returns [x,y]. |
GUI.GET_EXISTING_DIRECTORY | Function | Hybrid GUI functions | Shows a QFileDialog::getExistingDirectory-style dialog and returns the selected directory. Returns an empty string if the user cancels. |
GUI.GET_OPEN_FILE_NAME | Function | Hybrid GUI functions | Shows a QFileDialog::getOpenFileName-style dialog and returns one selected file path. Returns an empty string if the user cancels. |
GUI.GET_OPEN_FILE_NAMES | Function | Hybrid GUI functions | Shows a QFileDialog::getOpenFileNames-style dialog and returns selected file paths separated by newline characters. Returns an empty string if the user cancels. |
GUI.GET_POINT | Function | Hybrid GUI functions | Returns a picked point as [x,y], derived from the current ROI. mode can be CENTER, TOPLEFT or BOTTOMRIGHT. |
GUI.GET_RECT | Function | Hybrid GUI functions | Returns the current interactive ROI rectangle from a GUI image/stack window as an array [x,y,w,h]. |
GUI.GET_ROI_RECT | Function | Hybrid GUI functions | Returns the current interactive ROI rectangle from a GUI image/stack window as an array [x,y,w,h]. |
GUI.GET_SAVE_FILE_NAME | Function | Hybrid GUI functions | Shows a QFileDialog::getSaveFileName-style dialog and returns the destination path. Returns an empty string if the user cancels. |
GUI.GET_TRACKBAR_POS | Function | Hybrid GUI functions | Returns the current integer value of a GUI trackbar. |
GUI.GETCOLOR | Function | Hybrid GUI functions | Shows a QColorDialog::getColor-style dialog and returns the chosen color as #RRGGBB. Returns an empty string if the user cancels. |
GUI.GETEXISTINGDIRECTORY | Function | Hybrid GUI functions | Shows a QFileDialog::getExistingDirectory-style dialog and returns the selected directory. Returns an empty string if the user cancels. |
GUI.GETOPENFILENAME | Function | Hybrid GUI functions | Shows a QFileDialog::getOpenFileName-style dialog and returns one selected file path. Returns an empty string if the user cancels. |
GUI.GETOPENFILENAMES | Function | Hybrid GUI functions | Shows a QFileDialog::getOpenFileNames-style dialog and returns selected file paths separated by newline characters. Returns an empty string if the user cancels. |
GUI.GETSAVEFILENAME | Function | Hybrid GUI functions | Shows a QFileDialog::getSaveFileName-style dialog and returns the destination path. Returns an empty string if the user cancels. |
GUI.HISTOGRAM | Function | Hybrid GUI functions | Creates an interactive DataPlot histogram from an image. Modes include GRAY, RGB, BGR, R, G, B and A. |
GUI.INPUT | Function | Hybrid GUI functions | Shows a modal text input dialog and returns the entered string. |
GUI.INPUT_NUMBER | Function | Hybrid GUI functions | Shows a numeric input dialog. Returns the selected number, or an empty string if the user cancels. |
GUI.INPUT_TEXT | Function | Hybrid GUI functions | Shows a text input dialog and returns the entered string. Returns an empty string if the user cancels. |
GUI.MESSAGE | Command | GUI interaction statements | Alias of GUI.MSGBOX with a clearer name for script-driven user messages. |
GUI.MSGBOX | Command | GUI interaction statements | Shows a Qt information message box. |
GUI.NUMBER_INPUT | Function | Hybrid GUI functions | Shows a numeric input dialog. Returns the selected number, or an empty string if the user cancels. |
GUI.POINT | Function | Hybrid GUI functions | Returns a picked point as [x,y], derived from the current ROI. mode can be CENTER, TOPLEFT or BOTTOMRIGHT. |
GUI.PROFILE | Function | Hybrid GUI functions | Creates an interactive DataPlot profile from an image. Modes: H row profile, V column profile, XY arbitrary line profile with bilinear sampling. |
GUI.RECT | Function | Hybrid GUI functions | Returns the current interactive ROI rectangle from a GUI image/stack window as an array [x,y,w,h]. |
GUI.RELEASE_TRACKBARS | Command | GUI interaction statements | Removes all trackbars, or only those belonging to the selected panel. |
GUI.ROI_HISTOGRAM | Function | Hybrid GUI functions | Creates an interactive DataPlot histogram from a ROI using x,y,w,h and the selected histogram mode. |
GUI.ROI_PROFILE | Function | Hybrid GUI functions | Creates an interactive DataPlot profile from a ROI using x,y,w,h. H averages vertically per column; V averages horizontally per row. |
GUI.SET_TRACKBAR_POS | Command | GUI interaction statements | Sets an existing trackbar position from script. |
GUI.SHOW | Command | GUI interaction statements | Displays an image or stack in the GUI MDI area. If a title is provided and an image window with the same title already exists, that window is updated instead of opening a new one. |
GUI.TEXT_INPUT | Function | Hybrid GUI functions | Shows a text input dialog and returns the entered string. Returns an empty string if the user cancels. |
GUI.TRACKBAR | Command | GUI interaction statements | Creates or updates a Qt slider similar in spirit to OpenCV createTrackbar. Read it with GUI.TRACKBAR_POS(). |
GUI.TRACKBAR_POS | Function | Hybrid GUI functions | Returns the current integer value of a GUI trackbar. |
GUI.TRACKBAR_VALUE | Function | Hybrid GUI functions | Returns the current integer value of a GUI trackbar. |
GUI.WAIT_DRAWING | Function | Hybrid GUI functions | Generic interactive drawing wait. It waits for a GUI ROI change and returns either a rectangle array or point array. |
GUI.WAIT_KEY | Function | Hybrid GUI functions | Processes GUI events for delayMs milliseconds and returns the last pressed key as uppercase text, or an empty string when no key was pressed. delayMs=0 waits indefinitely. |
GUI.WAIT_POINT | Function | Hybrid GUI functions | Waits for a ROI/pick and returns the selected point as [x,y]. The default point is the ROI center. |
GUI.WAIT_RECT | Function | Hybrid GUI functions | Waits until the user draws/changes a ROI, then returns the rectangle as [x,y,w,h]. |
GUI.WAIT_ROI | Command | GUI interaction statements | Waits until the user creates, moves or resizes a ROI in the selected image/stack window. |
GUI.WAIT_ROI_CHANGE | Command | GUI interaction statements | Waits for any committed desktop ROI change. Use ROI.FROM_DESKTOP(img,title) to copy it into an image object, or ROI.CHANGE(title)/ROI.REVISION(title) to inspect the GUI state. |
GUI.WAIT_ROI_RECT | Function | Hybrid GUI functions | Waits until the user draws/changes a ROI, then returns the rectangle as [x,y,w,h]. |
GUI.CLEAR_ROI windowTitle
Clears the current ROI from the selected image/stack window.
GUI.CLEAR_ROI "Input image"GUI.CLOSE [windowTitle]
Closes an image or stack window in the GUI MDI area. Without arguments it closes the active image/stack window.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
windowTitle | Optional parameter. If omitted, the command uses its internal default. |
GUI.CLOSE "Preview"
GUI.CLOSEGUI.CONFIRM(text [, title])
Shows a Yes/No confirmation dialog and returns TRUE for Yes, FALSE for No.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
title | Optional GUI/DataPlot window title. |
IF NOT GUI.CONFIRM("Continue?", "Confirm") THEN
EXIT
ENDIFGUI.TRACKBAR name, panelTitle, min, max [, value]
Creates or updates a Qt slider similar in spirit to OpenCV createTrackbar. Read it with GUI.TRACKBAR_POS().
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
value | Scalar value written, drawn, or used as foreground/background according to the command. |
GUI.CREATE_TRACKBARGUI.GET_DRAWING(windowTitle [, shape [, pointMode]])
Generic drawing query. RECT/ROI/BOX returns [x,y,w,h]; POINT/CENTER/TOPLEFT/BOTTOMRIGHT returns [x,y].
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
shape | Optional parameter. If omitted, the command uses its internal default. |
pointMode | Optional parameter. If omitted, the command uses its internal default. |
value = GUI.GET_DRAWING(windowTitle [, shape [, pointMode]])GUI.GET_COLOR([initialColor [, title]])
Shows a QColorDialog::getColor-style dialog and returns the chosen color as #RRGGBB. Returns an empty string if the user cancels.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
initialColor | Optional parameter. If omitted, the command uses its internal default. |
title | Optional GUI/DataPlot window title. |
color = GUI.GET_COLOR("#FF8000", "Pick overlay color")
IF color = "" THEN
EXIT
ENDIFGUI.GET_DRAWING(windowTitle [, shape [, pointMode]])
Generic drawing query. RECT/ROI/BOX returns [x,y,w,h]; POINT/CENTER/TOPLEFT/BOTTOMRIGHT returns [x,y].
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
shape | Optional parameter. If omitted, the command uses its internal default. |
pointMode | Optional parameter. If omitted, the command uses its internal default. |
rect = GUI.GET_DRAWING("Source", "RECT")
p = GUI.GET_DRAWING("Source", "POINT")GUI.GET_EXISTING_DIRECTORY([title [, dir]])
Shows a QFileDialog::getExistingDirectory-style dialog and returns the selected directory. Returns an empty string if the user cancels.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
title | Optional GUI/DataPlot window title. |
dir | Optional parameter. If omitted, the command uses its internal default. |
dir = GUI.GET_EXISTING_DIRECTORY("Select dataset folder")
IF dir = "" THEN
EXIT
ENDIFGUI.GET_OPEN_FILE_NAME([title [, dir [, filter]]])
Shows a QFileDialog::getOpenFileName-style dialog and returns one selected file path. Returns an empty string if the user cancels.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
title | Optional GUI/DataPlot window title. |
dir | Optional parameter. If omitted, the command uses its internal default. |
filter | Optional parameter. If omitted, the command uses its internal default. |
file = GUI.GET_OPEN_FILE_NAME("Open image", "", "Images (*.png *.jpg *.tif *.tiff *.fit *.fits *.fts);;All files (*)")
IF file = "" THEN
EXIT
ENDIFGUI.GET_OPEN_FILE_NAMES([title [, dir [, filter]]])
Shows a QFileDialog::getOpenFileNames-style dialog and returns selected file paths separated by newline characters. Returns an empty string if the user cancels.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
title | Optional GUI/DataPlot window title. |
dir | Optional parameter. If omitted, the command uses its internal default. |
filter | Optional parameter. If omitted, the command uses its internal default. |
files = GUI.GET_OPEN_FILE_NAMES("Open images", "", "Images (*.png *.jpg *.tif *.tiff *.fit *.fits *.fts);;All files (*)")
PRINT filesGUI.GET_POINT(windowTitle [, mode])
Returns a picked point as [x,y], derived from the current ROI. mode can be CENTER, TOPLEFT or BOTTOMRIGHT.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
mode | Mode selector; accepted values are described in the command text. |
p = GUI.GET_POINT("Source")
PRINT ARRAY.GET(p,0), ARRAY.GET(p,1)GUI.GET_RECT(windowTitle)
Returns the current interactive ROI rectangle from a GUI image/stack window as an array [x,y,w,h].
rect = GUI.GET_RECT("Source")
PRINT ARRAY.GET(rect,0), ARRAY.GET(rect,1)GUI.GET_RECT(windowTitle)
Returns the current interactive ROI rectangle from a GUI image/stack window as an array [x,y,w,h].
value = GUI.GET_RECT(windowTitle)GUI.GET_SAVE_FILE_NAME([title [, dir [, filter]]])
Shows a QFileDialog::getSaveFileName-style dialog and returns the destination path. Returns an empty string if the user cancels.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
title | Optional GUI/DataPlot window title. |
dir | Optional parameter. If omitted, the command uses its internal default. |
filter | Optional parameter. If omitted, the command uses its internal default. |
outPath = GUI.GET_SAVE_FILE_NAME("Save result", "result.png", "PNG (*.png);;All files (*)")
IF outPath = "" THEN
EXIT
ENDIFGUI.TRACKBAR_POS(name, panelTitle)
Returns the current integer value of a GUI trackbar.
value = GUI.TRACKBAR_POS(name, panelTitle)GUI.GET_COLOR([initialColor [, title]])
Shows a QColorDialog::getColor-style dialog and returns the chosen color as #RRGGBB. Returns an empty string if the user cancels.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
initialColor | Optional parameter. If omitted, the command uses its internal default. |
title | Optional GUI/DataPlot window title. |
value = GUI.GET_COLOR([initialColor [, title]])GUI.GET_EXISTING_DIRECTORY([title [, dir]])
Shows a QFileDialog::getExistingDirectory-style dialog and returns the selected directory. Returns an empty string if the user cancels.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
title | Optional GUI/DataPlot window title. |
dir | Optional parameter. If omitted, the command uses its internal default. |
value = GUI.GET_EXISTING_DIRECTORY([title [, dir]])GUI.GET_OPEN_FILE_NAME([title [, dir [, filter]]])
Shows a QFileDialog::getOpenFileName-style dialog and returns one selected file path. Returns an empty string if the user cancels.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
title | Optional GUI/DataPlot window title. |
dir | Optional parameter. If omitted, the command uses its internal default. |
filter | Optional parameter. If omitted, the command uses its internal default. |
value = GUI.GET_OPEN_FILE_NAME([title [, dir [, filter]]])GUI.GET_OPEN_FILE_NAMES([title [, dir [, filter]]])
Shows a QFileDialog::getOpenFileNames-style dialog and returns selected file paths separated by newline characters. Returns an empty string if the user cancels.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
title | Optional GUI/DataPlot window title. |
dir | Optional parameter. If omitted, the command uses its internal default. |
filter | Optional parameter. If omitted, the command uses its internal default. |
value = GUI.GET_OPEN_FILE_NAMES([title [, dir [, filter]]])GUI.GET_SAVE_FILE_NAME([title [, dir [, filter]]])
Shows a QFileDialog::getSaveFileName-style dialog and returns the destination path. Returns an empty string if the user cancels.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
title | Optional GUI/DataPlot window title. |
dir | Optional parameter. If omitted, the command uses its internal default. |
filter | Optional parameter. If omitted, the command uses its internal default. |
value = GUI.GET_SAVE_FILE_NAME([title [, dir [, filter]]])GUI.HISTOGRAM mode, image, bins [, title]
Creates an interactive DataPlot histogram from an image. Modes include GRAY, RGB, BGR, R, G, B and A.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
title | Optional GUI/DataPlot window title. |
p = GUI.HISTOGRAM "GRAY", img, 256
pRgb = GUI.HISTOGRAM "RGB", img, 256GUI.INPUT(prompt [, defaultText [, title]])
Shows a modal text input dialog and returns the entered string.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
defaultText | Default text shown by the input dialog. |
title | Optional GUI/DataPlot window title. |
name = GUI.INPUT("Dataset name", "test", "Input")GUI.INPUT_NUMBER(prompt [, defaultValue [, minValue [, maxValue [, decimals [, title]]]]])
Shows a numeric input dialog. Returns the selected number, or an empty string if the user cancels.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
defaultValue | Optional parameter. If omitted, the command uses its internal default. |
minValue | Lower numeric range limit. |
maxValue | Upper numeric range limit. |
decimals | Optional parameter. If omitted, the command uses its internal default. |
title | Optional GUI/DataPlot window title. |
thr = GUI.INPUT_NUMBER("Threshold", 128, 0, 255, 0, "Input")
IF thr = "" THEN
EXIT
ENDIFGUI.INPUT_TEXT(prompt [, defaultText [, title]])
Shows a text input dialog and returns the entered string. Returns an empty string if the user cancels.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
defaultText | Default text shown by the input dialog. |
title | Optional GUI/DataPlot window title. |
name = GUI.INPUT_TEXT("Operator name", "Manuele", "Input")
IF name = "" THEN
EXIT
ENDIFGUI.MESSAGE text [, title]
Alias of GUI.MSGBOX with a clearer name for script-driven user messages.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
title | Optional GUI/DataPlot window title. |
GUI.MESSAGE "Processing complete", "cvBasic"GUI.MSGBOX text [, title]
Shows a Qt information message box.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
title | Optional GUI/DataPlot window title. |
GUI.MSGBOX "Processing complete", "cvBasic"GUI.INPUT_NUMBER(prompt [, defaultValue [, minValue [, maxValue [, decimals [, title]]]]])
Shows a numeric input dialog. Returns the selected number, or an empty string if the user cancels.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
defaultValue | Optional parameter. If omitted, the command uses its internal default. |
minValue | Lower numeric range limit. |
maxValue | Upper numeric range limit. |
decimals | Optional parameter. If omitted, the command uses its internal default. |
title | Optional GUI/DataPlot window title. |
value = GUI.INPUT_NUMBER(prompt [, defaultValue [, minValue [, maxValue [, decimals [, title]]]]])GUI.GET_POINT(windowTitle [, mode])
Returns a picked point as [x,y], derived from the current ROI. mode can be CENTER, TOPLEFT or BOTTOMRIGHT.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
mode | Mode selector; accepted values are described in the command text. |
value = GUI.GET_POINT(windowTitle [, mode])GUI.PROFILE mode, image, coord OR GUI.PROFILE mode, image, sx, sy, dx, dy [, title]
Creates an interactive DataPlot profile from an image. Modes: H row profile, V column profile, XY arbitrary line profile with bilinear sampling.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
title | Optional GUI/DataPlot window title. |
p = GUI.PROFILE "H", img, 120
pLine = GUI.PROFILE "XY", img, 10, 10, 250, 180GUI.GET_RECT(windowTitle)
Returns the current interactive ROI rectangle from a GUI image/stack window as an array [x,y,w,h].
value = GUI.GET_RECT(windowTitle)GUI.RELEASE_TRACKBARS [panelTitle]
Removes all trackbars, or only those belonging to the selected panel.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
panelTitle | Optional parameter. If omitted, the command uses its internal default. |
GUI.RELEASE_TRACKBARS "Controls"GUI.ROI_HISTOGRAM mode, image, x, y, w, h, bins [, title]
Creates an interactive DataPlot histogram from a ROI using x,y,w,h and the selected histogram mode.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
title | Optional GUI/DataPlot window title. |
p = GUI.ROI_HISTOGRAM "GRAY", img, 100, 80, 200, 120, 256GUI.ROI_PROFILE mode, image, x, y, w, h [, title]
Creates an interactive DataPlot profile from a ROI using x,y,w,h. H averages vertically per column; V averages horizontally per row.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
title | Optional GUI/DataPlot window title. |
p = GUI.ROI_PROFILE "H", img, 100, 80, 200, 40GUI.SET_TRACKBAR_POS name, panelTitle, value
Sets an existing trackbar position from script.
GUI.SET_TRACKBAR_POS "Brightness", "Controls", 0GUI.SHOW imageOrStack [, title]
Displays an image or stack in the GUI MDI area. If a title is provided and an image window with the same title already exists, that window is updated instead of opening a new one.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
title | Optional GUI/DataPlot window title. |
GUI.SHOW img, "Preview"GUI.INPUT_TEXT(prompt [, defaultText [, title]])
Shows a text input dialog and returns the entered string. Returns an empty string if the user cancels.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
defaultText | Default text shown by the input dialog. |
title | Optional GUI/DataPlot window title. |
value = GUI.INPUT_TEXT(prompt [, defaultText [, title]])GUI.TRACKBAR name, panelTitle, min, max [, value]
Creates or updates a Qt slider similar in spirit to OpenCV createTrackbar. Read it with GUI.TRACKBAR_POS().
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
value | Scalar value written, drawn, or used as foreground/background according to the command. |
GUI.TRACKBAR "Brightness", "Controls", -100, 100, 0GUI.TRACKBAR_POS(name, panelTitle)
Returns the current integer value of a GUI trackbar.
b = GUI.TRACKBAR_POS("Brightness", "Controls")GUI.TRACKBAR_POS(name, panelTitle)
Returns the current integer value of a GUI trackbar.
value = GUI.TRACKBAR_POS(name, panelTitle)GUI.WAIT_DRAWING(windowTitle [, shape [, pointMode]])
Generic interactive drawing wait. It waits for a GUI ROI change and returns either a rectangle array or point array.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
shape | Optional parameter. If omitted, the command uses its internal default. |
pointMode | Optional parameter. If omitted, the command uses its internal default. |
rect = GUI.WAIT_DRAWING("Source", "RECT")GUI.WAIT_KEY([delayMs])
Processes GUI events for delayMs milliseconds and returns the last pressed key as uppercase text, or an empty string when no key was pressed. delayMs=0 waits indefinitely.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
delayMs | Optional parameter. If omitted, the command uses its internal default. |
key = GUI.WAIT_KEY(10)
IF key = "Q" OR key = "X" THEN
running = FALSE
ENDIFGUI.WAIT_POINT(windowTitle [, mode])
Waits for a ROI/pick and returns the selected point as [x,y]. The default point is the ROI center.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
mode | Mode selector; accepted values are described in the command text. |
p = GUI.WAIT_POINT("Source", "CENTER")GUI.WAIT_RECT(windowTitle)
Waits until the user draws/changes a ROI, then returns the rectangle as [x,y,w,h].
rect = GUI.WAIT_RECT("Source")
patch = ROI.EXTRACT(img, rect)GUI.WAIT_ROI windowTitle
Waits until the user creates, moves or resizes a ROI in the selected image/stack window.
GUI.WAIT_ROI "Input image"GUI.WAIT_ROI_CHANGE windowTitle
Waits for any committed desktop ROI change. Use ROI.FROM_DESKTOP(img,title) to copy it into an image object, or ROI.CHANGE(title)/ROI.REVISION(title) to inspect the GUI state.
GUI.WAIT_ROI_CHANGE "Input image"
PRINT ROI.CHANGE("Input image"), ROI.REVISION("Input image")GUI.WAIT_RECT(windowTitle)
Waits until the user draws/changes a ROI, then returns the rectangle as [x,y,w,h].
value = GUI.WAIT_RECT(windowTitle)