Commercial License Notice

The code generation modules, runtime target bindings, and underlying high-performance InfiniWorkflow Engine Library are proprietary software covered strictly under the Photron USA Inc. Commercial License Agreement. Redistribution, production deployment, or embedding these binaries into commercial applications requires a valid enterprise subscription tier.

1. What is CodeGen?

CodeGen turns your workflow into application or integration code. Depending on what you need, you can generate a complete sample application, a plugin, an extension, a notebook, or only the underlying processing code.

Sample App

Creates a complete application with a configurable user interface. This is the option to use when you want to design the application's controls, views, features, appearance, and build behavior.

OFX Plugin

Creates an OpenFX plugin suitable for hosts such as Resolve and Nuke.

PFV4 Plugin

Creates a Photron PFV4 plugin for camera frame buffers.

MATLAB Ext

Creates a MEX extension that can be called from MATLAB.

Jupyter Notebook

Creates an interactive Python notebook configured around the workflow.

Only Code

Generates the core processing code without the sample application's GUI.

Which option should I choose?
Choose Sample App when you want to customize the application's interface. Choose Only Code when you only need the processing implementation. Use the plugin or notebook options when the generated code is intended for those environments.

2. Starting CodeGen

  1. Open CodeGen from the application.
  2. Choose the type of output you want to create.
  3. Enter an Application Name for generated applications.
  4. Click Proceed.
  5. If you selected Sample App, the GUI Designer opens so you can configure the application before generation.

Application Name

The Application Name identifies the generated application. Use a simple name such as my_app. The application name is also used when creating the generated application workspace.

Cancel

Cancel closes the CodeGen setup without starting generation.

Proceed

Proceed continues with the selected generation type. You must enter an application name before continuing from the application setup screen.

Example: the CodeGen setup screen
CodeGen
Cancel
Proceed

3. CodeGen Options

Sample App — C++

Creates a C++ sample application with a configurable GUI. Selecting this option takes you to the GUI Designer.

Sample App — Python

Creates a Python sample application with a configurable GUI. Selecting this option takes you to the GUI Designer.

OFX Plugin

Creates a C++ OpenFX plugin. This is intended for OpenFX-compatible hosts such as Resolve and Nuke.

PFV4 Plugin

Creates a C++ Photron PFV4 plugin for camera frame buffers.

MATLAB Ext

Creates a MATLAB MEX extension that can be called directly from MATLAB scripts.

Jupyter Notebook

Creates a Python Jupyter Notebook configured for interactive use.

Only Code — C++

Generates C++ processing code without the sample application's GUI.

Only Code — Python

Generates Python processing code without the sample application's GUI.

The available generation choices and their C++/Python modes are defined by the CodeGen configuration.

4. GUI Designer Overview

The GUI Designer compiles your workflow into a standalone application - a generated C++ or Python program with its own window, viewer, and parameter sidebar - instead of running inside INFINIWORKFLOW itself. It opens as a wizard: drag parameters from the left tree onto the canvas to place them in the generated app's layout, switch to the Views tab to choose which viewers show video output, Features to enable optional built-in tools (Zoom, Measurement, Stabilization, Keystone, Telemetry), and Style to pick a theme preset (Dark, Nord, Cyberpunk, Custom) and fine-tune colors, spacing, rounding and fonts. Build shows packaging/installer options before generating the final app. Clicking Proceed sends the full layout/theme configuration as JSON to the backend, which runs the same node-graph-to-code generator used for exporting group nodes as OFX/PFV4 plugins - see docs/gui_designer_codegen.md for that JSON payload's full structure if you're extending the generator itself rather than just using the wizard.

The designer is organized into five main areas:

  1. Parameters — the available workflow controls and outputs.
  2. Canvas — where you arrange application controls.
  3. Views — where you configure visual and telemetry outputs.
  4. Features — where you choose application capabilities.
  5. Style — where you configure the appearance and layout behavior.
  6. Build — where C++ applications can be configured for automatic compilation, execution, and packaging.
Example: the GUI Designer wizard, Canvas tab
Back
Configuring Interface: CPP
Proceed
Canvas
Views
Features
Style
Build
Parameters
Gain (slider)
Exposure (slider)
Trigger Mode (dropdown)
Outputs
FPS (readout)
Gain
Exposure
Trigger Mode ▾
FPS: 29.9

Back

Back returns to the CodeGen selection screen without proceeding with the current designer configuration.

Proceed

Proceed accepts the current GUI configuration and starts generation.

5. Canvas Tab

The Canvas is where you design the application's control interface. You can drag workflow parameters onto the canvas, move them, resize them, select multiple controls, and organize controls into separate application tabs.

Parameters panel

The left side of the designer contains the parameters available from your workflow.

UI Widgets

Workflow nodes

Each workflow node appears as a group containing its available inputs and outputs.

Search

Use the search field at the top of the Parameters area to quickly find a node, input, or output.

Adding a control

  1. Find the parameter in the Parameters area.
  2. Drag it onto the Canvas.
  3. Drop it where you want the control to appear.
  4. Select the control to edit its properties.
You can also drag an entire workflow node onto the Canvas. This creates a group of controls for that node rather than requiring each parameter to be added individually.

Moving and resizing controls

Click and drag a control to move it. Select a control to expose its resize handle, then drag the handle to change its size.

Selecting multiple controls

Multiple controls can be selected together. Multi-selection is useful for moving groups of controls or aligning them.

Alignment

ButtonWhat it does
Align LeftLines up selected controls using their left edges.
Align CenterCenters selected controls horizontally.
Align RightLines up selected controls using their right edges.

Clear

Clear removes the controls from the current canvas so you can rebuild the layout.

Undo and Redo

Undo reverses recent layout changes. Redo restores a change that was undone.

6. Organizing the Interface with Canvas Tabs

Canvas tabs let you divide a complex application interface into separate pages of controls.

Adding a tab

Click + Tab to create a new page. The new page starts with the name New Tab.

Renaming a tab

Double-click a tab name to rename it. Use meaningful names such as Camera, Processing, Output, or Advanced.

Switching tabs

Click a tab to make it the active control page.

Deleting a tab

Use the tab's close button to delete it. You will be asked to confirm because all controls on that page are deleted with the tab. The final remaining tab cannot be deleted.

Important: deleting a tab also deletes the parameters placed on that tab. Make sure you have moved anything you want to keep before confirming.

7. Control Properties

Select a control on the Canvas to edit its properties.

Assigned Tab

Choose which application page should contain the selected control.

Display Label / Text

Change the text displayed next to or inside the control.

Text Color

For text labels, choose the color used by the label.

Text Alignment

Text labels can be aligned Left, Center, or Right.

Camera Options

Camera-related controls can have camera-source constraints where applicable.

Position and Size

You can directly edit the control's X, Y, Width, and Height values for precise placement.

Remove Selected

Use Remove Selected to delete the selected control from the interface.

Different controls have different properties

The properties shown depend on the selected item. For example, text labels expose text and alignment settings, while camera controls can expose camera-specific settings.

8. Views Tab

The Views tab controls what the application displays as visual outputs and telemetry.

Media

The Media area contains image/video-style outputs from the workflow.

Output title

Give each output a meaningful title. The title is what users see when interacting with the generated application.

Default View

Use Set as Default to make a media output the application's default view.

Remove

Remove an output from the application's configured views when it is not needed.

Telemetry

Telemetry outputs are numeric or other non-video values that can be displayed by the application.

Tip: use clear titles for outputs. For example, instead of leaving a technical port name visible, use a user-facing description such as Frame Rate, Temperature, or Edge Strength.

9. Features Tab

The Features tab determines which capabilities are available to users of the generated application.

Playback Controls

The playback section controls navigation through media or frames. Each toggle below only sets the initial state - the generated app also gets a Preferences > Playback Controls page with the same five checkboxes, so an end user can show or hide any of these buttons at runtime without a rebuild; that choice is saved to settings and restored on the next launch.

FeaturePurpose
Seek FirstMove to the first available frame or position.
Seek PriorMove to the previous frame or position.
Seek NextMove to the next frame or position.
Seek LastMove to the final available frame or position.
Set Frame NumberAdds a button (crosshair/target glyph in C++, a calculator icon in Python) next to the timeline that opens a small modal with a calculator-style numeric keypad for typing an exact frame number to jump to. Off by default, like the four Seek toggles above. In a Multi-View group with Bidirectional Timeline on, using it also claims playback authority for the whole group, same as any other transport control.

Application Features

FeaturePurpose
ZoomProvides zoom functionality for the displayed content.
ImageProvides image-related viewing functionality.
MeasurementProvides measurement functionality.
StabilizeProvides stabilization functionality.
Key StoneProvides keystone correction functionality.
Pixel ProbeProvides pixel inspection functionality.
ViewProvides view-related functionality.
Undo / RedoProvides undo/redo related functionality.
Load / SaveProvides load/save of settings functionality.
Reset AllProvides reset all of settings functionality.
TelemetryProvides telemetry display functionality.
SpawnProvides the Multi-View menu, letting the running application launch and tile extra copies of itself ("followers") alongside the original ("master").

Available and Enabled

Features are managed using two lists:

Moving features

ButtonAction
Move AllEnables all available features.
MoveMoves selected features into the Enabled list.
Move in the opposite directionReturns selected enabled features to Available.
Move All in the opposite directionRemoves all optional features from Enabled.
Recommended approach: only enable features your application's users actually need. This keeps the generated interface simpler and easier to use.

10. Style Tab

The Style tab controls the visual appearance and layout behavior of the generated application.

App Features & Layout

Controls Position

OptionResult
LeftApplication controls appear on the left side of the interface.
RightApplication controls appear on the right side.
FloatingControls use a floating panel arrangement.

Timeline Position

OptionResult
EmbeddedThe timeline is integrated with the viewing area.
TopThe timeline appears above the viewer.
BottomThe timeline appears below the viewer.

Fonts & Global

Padding & Spacing

These controls determine how much space is used around windows, frames, items, and nested controls. Adjust them to make the interface more compact or more spacious.

Rounding & Borders

These controls determine the amount of corner rounding and border thickness used throughout the interface, including windows, frames, popups, tabs, scrollbars, and controls.

Colors

Colors are grouped into logical sections:

Theme Presets

The available presets include:

Theme Search

Use the search field to quickly locate a style setting.

Live Preview

The live preview shows how the application's controls, viewer, and timeline will be arranged. Use it while experimenting with layout settings so you can see the effect before generating the application.

Customizing a preset: once you change individual style values, the designer treats the theme as a custom configuration so your changes can be retained.
Example: the GUI Designer wizard, Style tab
Canvas
Views
Features
Style
Build

11. Build Tab

The Build tab provides build and packaging options for C++ Sample Apps.

Automatic Compilation

Enable Automatic Compilation (Build) controls whether the generated C++ application is automatically compiled.

Automatic Execution

Enable Automatic Execution (Run) controls whether the application is launched automatically after a successful build.

Run depends on Build. Automatic execution is only useful when automatic compilation is enabled.

Packaging & Installer

Enable the installer/package option when you want the generated application prepared for distribution.

Installer information includes:

SettingWhat to enter
Author / CompanyThe company or person responsible for the application.
VersionThe application's release version.
App Identifier / Bundle IDThe unique application identifier.
DescriptionA description of the application.
License File PathAn optional license file to include with the package.
Package all executablesIf checked, packages all executables located in the external/bin directory. If unchecked, only the main application executable is packaged.

The interface describes packaging targets as NSIS Windows / DMG Mac / AppImage Linux.

Example: the GUI Designer wizard, Build tab
Canvas
Views
Features
Style
Build
Enable Automatic Compilation (Build)
Enable Automatic Execution (Run)
Package for distribution

12. Generating the Application

After configuring the designer, click Proceed.

  1. The designer saves the current configuration.
  2. CodeGen starts generating the selected application.
  3. A progress display shows the generation status.
  4. When generation finishes, the generated files are displayed.

The generation request includes the selected generation mode, layout configuration, application name, workflow, and plugin/notebook options where applicable.

13. Generated Source

After generation, the application displays the generated files so you can inspect the result.

Build & Run

When the generated result contains a buildable application, Build & Run is available. The generated result is considered buildable when the expected CMake or Python application files are present.

Copying build output

The build workspace provides a console showing compiler/build messages. Use this output when diagnosing a failed build.

Build progress

During compilation, the status can progress through workspace creation, CMake configuration, C++ compilation, deployment, and finally a successful running state.

14. Recommended User Workflow

  1. Choose Sample App if you need a custom application interface.
  2. Enter the application name.
  3. Open the Canvas.
  4. Add the important workflow inputs. Drag them from Parameters onto the Canvas.
  5. Organize controls into tabs. Use separate tabs for logical groups of controls.
  6. Configure control properties. Set labels, placement, size, and other available options.
  7. Configure Views. Add the visual outputs users should see and choose a default view.
  8. Configure Telemetry. Add useful numeric outputs and give them readable names and colors.
  9. Configure Features. Enable only the capabilities users need.
  10. Configure Style. Choose the control position, timeline location, theme, colors, spacing, and other appearance settings.
  11. Configure Build. For C++, decide whether the application should build and run automatically and whether it should be packaged.
  12. Proceed. Generate the application.
  13. Build & Run. If available, compile and launch the generated application.

15. Practical Design Tips

Keep the Canvas simple

Do not place every parameter on one page. Use Canvas tabs to separate groups of related controls.

Use user-facing labels

Technical workflow parameter names may be useful to developers but confusing to end users. Rename displayed labels to describe what the setting actually does.

Choose a useful default view

If your workflow produces several visual outputs, choose the output users are most likely to need first as the default.

Do not enable unnecessary features

Every enabled feature adds another capability to the generated application. Keep the interface focused on the application's purpose.

Use Style after the interface is functional

First build the controls and views, then use Style to refine the appearance and layout. This makes it easier to distinguish functional changes from visual changes.

Test Build and Run before packaging

For C++ applications, verify that the generated application builds and runs correctly before preparing the installer/package.

16. Quick Reference

Screen / TabMain purpose
CodeGenChoose what kind of code or application to generate.
CanvasDesign the application's controls and control pages.
ViewsConfigure visual outputs and telemetry.
FeaturesChoose playback and application capabilities.
StyleConfigure layout, fonts, spacing, colors, borders, rounding, and theme.
BuildConfigure automatic C++ build/run and packaging.
ProceedAccept the configuration and generate the application.
BackReturn to the previous configuration screen.

17. Build, Run & Installer Generation

Upon generating your application, you are provided with a Source code explorer interface. This interface allows you to:

Installer Generation (NSIS Requirement)

The system also provides a Standalone ZIP Packager that compresses your application into a final distributable artifact. To successfully build full executable installers via this backend service, you must install NSIS (Nullsoft Scriptable Install System) on your build machine. Ensure that the makensis executable is explicitly added to your system's PATH environment variable so the automated packaging scripts can invoke it correctly.

Bundling the Visual C++ Redistributable

If your application depends on the Visual C++ runtime, you can have the installer check for it and install it automatically — no code changes required.

Place your copy of VC_redist.x64.exe in the codegen_installer folder (located at the same level as the app folder). If not found there, the generator will check the assets folder. During generation, the installer:

This means bundling the redistributable is entirely optional and additive — including or omitting VC_redist.x64.exe is the only thing you need to do.


Customizing Your App and Installer Branding

When you generate your C++ or Python applications, the system automatically includes default branding assets and licensing files so your app is ready to compile immediately. However, you can easily override these defaults to fully customize and white-label your application and its installer.

How It Works

The code generator uses a hierarchical override directory codegen_installer (located at the same level as the app folder) to search for custom branding and configuration files. Below are the precise search priority paths for each supported asset type:

1. Sidebar and Topbar Bitmaps (sidebar.bmp, topbar.bmp)
  1. Specific app override: codegen_installer/{{app_name}}/{{filename}}
  2. General installer override: codegen_installer/{{filename}}
  3. Ultimate fallback: Default system bitmaps inside app/static/assets/
2. End User License Agreements (EULA.txt, LICENSE.txt)
  1. Specific app override: codegen_installer/{{app_name}}/{{filename}}
  2. General installer override: codegen_installer/{{filename}}
  3. Ultimate fallback: Root level {{filename}}
3. Extra Assets Copy List and Localization (manifest.txt, localize.txt)
  1. Specific app override: codegen_installer/{{app_name}}/{{filename}}
  2. General installer override: codegen_installer/{{filename}}
  3. Workspace assets fallback: assets/{{filename}} for manifest.txt; assets/localize/{{filename}} for localize.txt and every per-language file (see the Localization section above).
4. App Icon and Splashscreen (favicon.ico, splashscreen.png)
  1. Specific app override: codegen_installer/{{app_name}}/{{filename}}
  2. General installer override: codegen_installer/{{filename}}
  3. Workspace assets override: assets/{{filename}}
  4. Ultimate fallback: Default system icon/splashscreen inside app/static/ or app/static/assets/
5. User Guide (user_guide.html)
  1. Specific app override: codegen_installer/{{app_name}}/user_guide.html
  2. General installer override: codegen_installer/user_guide.html
  3. Ultimate fallback: Default system app/static/assets/user_guide.html

Manifest File Security Constraints

For safety and traversal protection, entries in manifest.txt must comply with strict validation rules:

The Result

There is no need to modify any code, scripts, or configuration files. Just drop your preferred assets into the override locations, and the next time you trigger the code generation, your custom branding will automatically replace the defaults!

Code Signing Your Executable and Installer

If you have a code-signing process, you can have it applied automatically during generation.

Place a signing script in your project's assets folder:

The script should accept a single argument — the full path to the file to sign — and sign that file in place (for example, by calling out to signtool on Windows or codesign/your own signing tooling on macOS/Linux).

When a signing script is found:

If no signing script is present in assets, signing is skipped entirely and generation proceeds exactly as it would otherwise — no extra steps, no changes to your build.

Note: The uninstaller that ships inside the installer is not currently signed as part of this process.

18. Localization

To translate or customize text within your generated application, the engine supports drop-in localization dictionaries. Follow these steps to implement custom strings:

  1. Navigate to the assets/localize directory within your project workspace (create it if it doesn't exist yet).
  2. Create a text file explicitly named localize.txt (or one of the language-specific filenames below).
  3. Add your translations using a standard key-value format. You can use either an equals sign (=) or a colon (:) as a delimiter.

Example assets/localize/localize.txt formatting:

# This is a comment line
my_app = My Custom App Name
Zoom In : Magnify View
Tracking Progress = Processando o Rastreamento

Note: The engine will automatically load these pairs at runtime and replace corresponding tr("...") text wrapping instances in the UI. Localization files live under an assets/localize/ subfolder (not flat in assets/) to keep that folder from accumulating one file per bundled language - the icons used by "..." buttons live in their own assets/icons/ subfolder for the same reason.

Default Language (GUI Designer)

The Style tab of the GUI Designer (for the standalone C++/Python sample-app targets - not shown for PFV4 plugin exports) has a Default Language dropdown next to the theme preset picker. This sets which bundled dictionary the generated app starts with; the end user can still change it afterward via Preferences > Language at runtime, same as always.

Multiple Languages & the Preferences > Language Selector

Beyond the single always-loaded localize.txt above, the generated application also ships with a Preferences > Language dropdown that lets the end user switch between several bundled dictionaries at runtime, without editing any files themselves:

Language combo entryDictionary file
Englishlocalize.txt - the same file described above (empty by default, so every tr("...") call falls back to its own English key text unless you've added overrides). Also the default unless a different Default Language is set in the GUI Designer's Style tab.
Germanlocalize_de-DE.txt
Spanishlocalize_es-ES.txt
Frenchlocalize_fr-FR.txt
Japaneselocalize_ja-JP.txt
Chineselocalize_zh-CN.txt

Each of these files uses the exact same key-value format as localize.txt above, lives in the same assets/localize/ subfolder, and is resolved through the same codegen_installer/<app_name> → codegen_installer → workspace assets/localize/ override hierarchy described under "Extra Assets Copy List and Localization" above - a language file that can't be resolved anywhere for a given build simply isn't bundled, and its combo entry falls back to English text at runtime instead of failing to build.

19. Application User Interface Features

The generated application's user interface can be extended with application features by adding them in the Features tab of the GUI designer.

1. Zoom Controls

2. Image Adjustments & Comparison

3. Measurement & Calibration

4. Stabilization

5. Keystone Correction

6. View Selector & Exporting

7. Telemetry & Data Inspection

8. Playback & Timeline

9. Multi-View (Spawn)

Enabling the "Spawn" feature lets the running application launch up to three extra copies of itself ("followers") and tile them alongside the original window ("master") - useful for showing several views of the same live data side by side.

10. Logging

Every generated application (C++ and Python alike) writes a small diagnostic log file on every run, so a user who hits a problem has something concrete to send back rather than a screenshot of a crash.

20. Architecture & API Usage

Regardless of your chosen output language, your code follows a matching workflow lifecycle to manage memory boundaries and thread execution models cleanly:

C++ API


OVERALL C++ WORKFLOW LIFECYCLE USAGE HANDBOOK:

INITIALIZATION & SETUP:
AppLogic app;
if (!app.initEngine()) { // Initializes Photron Engine
    // Handle DLL loading failure safely
    return -1;
}
app.setupWorkflow(); // Hydrates pipeline handles, configurations, and topology

LIVE PARAMETER MODIFICATION:
Modifies parameter values type-safely via Port Enums mapped dynamically:
app.updateNodeVal(NodeID::AI_WELDING, AI_WeldingInputs::MODEL, std::string("..."));

LIVE VIEWER API:
Registers a live callback to view output of a node's port
app.addImageLive(NodeID::AI_WELDING, 2, "live_ai_welding_2", on_ai_welding_2_callback);
app.addMatrixLive(NodeID::WELD_ANALYSIS, 0, "live_weld_analysis_0", on_weld_analysis_0_callback);
app.addNumericLive(NodeID::WELD_ANALYSIS, 2, "live_weld_analysis_2", on_weld_analysis_2_numeric_callback);

C++ Example

Below is a typical lifecycle implementation mapping the exported C++ target bindings based on the engine's initialization architecture:

#include "app_logic.h"
#include <iostream>
#include <mutex>
#include <opencv2/opencv.hpp>

// Define a global lock and frame buffer
std::mutex g_data_mutex;
cv::Mat g_ai_welding_2_frame;

// Define the live image callback
void on_ai_welding_2_callback(const cv::Mat& frame) {
    std::lock_guard<std::mutex> lock(g_data_mutex);
    if (!frame.empty()) {
        frame.copyTo(g_ai_welding_2_frame);
    }
}

int main() {
    AppLogic app;
    
    // 1. Initialize engine library bindings
    if (!app.initEngine()) {
        std::cerr << "Failed to load photron_engine runtime binary." << std::endl;
        return -1;
    }
    
    // 2. Hydrate configuration parameters and thread topology
    app.setupWorkflow(); 
    
    // 3. Connect Live View Listeners
    app.addImageLive(NodeID::AI_WELDING, 2, "live_ai_welding_2", on_ai_welding_2_callback);
    
    // 4. Update active node attributes type-safely via generated Port Enums
    app.updateNodeVal(NodeID::AI_WELDING, AI_WeldingInputs::MODEL, std::string("path/to/model.onnx"));
    
    // Main UI or execution loop would continue here...
    return 0;
}

Local C++ Compilation & Deployment

To compile your pipeline using native C++ bindings, ensure your built application can access all engine library links correctly by executing the following steps:

  1. Download the generated app_logic.h and app_logic.cpp files and add them to your C++ application project layout.
  2. Build the source files together with your main orchestration code into a compiled executable file.
  3. Move or copy your finalized executable binary artifact into the designated bin directory or run the included standalone zip packager.
  4. Execute your application binary directly from that folder.
Method Description & Examples
__init__ Initializes the Photron engine, configures the PythonNodeFactory, and sets up essential FFI callback types and memory management to prevent garbage collection crashes.
initialize_workflow Entry point for building the computational pipeline; instantiates C++ nodes and Python proxies, sets node parameters, and establishes edge connections.
add_live_viewer Creates a live viewer node, connects it to a source, and registers a callback for C++ nodes

Examples:
1. Numeric: app.add_live_viewer(NodeID.NUMERIC_A_B, 0, 'numeric', lambda val: print(f"Value: {val}"))
2. String: app.add_live_viewer(NodeID.STR, 0, 'string', lambda s: print(f"String: {s.decode('utf-8')}"))
3. Matrix: app.add_live_viewer(NodeID.DARKNET_YOLO7_CLASSIFICATION, 0, 'matrix', lambda mat: print(f"Mean: {mat.mean()}"))
4. Image: app.add_live_viewer(NodeID.MOVIE_READER, 0, 'image', lambda img: print(f"Shape: {img.shape}"))

Note: Automatically wraps raw C++ pointers into NumPy arrays and uses arr.copy() to ensure data persistence.
execution_loop A daemon thread that manages node updates, triggers re-execution for "dirty" Python nodes, and handles stream inspection logging.
update_node_val Updates node parameters; if the target is a Python node, it marks it as "dirty" for re-execution; otherwise, it calls the engine’s parameter setter.
view_node Designates a node/port for real-time inspection. For Python nodes, it enables internal monitoring; for C++ nodes, it triggers native engine rendering.
update_from_cpp Synchronizes Python state with C++ updates, parsing binary streams and mapping raw data buffers to NumPy arrays.
python_proxy_callback A static FFI handler invoked by the C++ engine to flag specific proxy nodes as "dirty" when their port data updates.
stop Signals the execution thread to stop and gracefully shuts down the workflow pipeline.
setNodeInputCudaFrame GPU-resident (CUDA) counterpart to setNodeInputMemoryFrame - pushes a live CUDA device frame (a raw pointer, e.g. from PyCUDA/CuPy/torch's .data_ptr()) into a cuda.memory_source node. Copies (cudaMemcpy2D) into a buffer the engine owns - accepts any input pitch. Caller may reuse/free the pointer the instant this call returns. See GPU-Resident (CUDA) Live APIs below.
attachNodeInputCudaFrame Zero-copy sibling of setNodeInputCudaFrame - adopts the device pointer directly at push time, no copy. The pointer must already be packed (pitch == width * num_channels * bytesPerPixel) - rejected (returns False) otherwise. The optional release_callback fires once the engine has copied the frame into its own output buffer - that's when it's safe to reuse/free the pointer.
add_cuda_image_live GPU-resident counterpart to add_live_viewer(..., 'image', ...) - the callback receives a live CUDA device pointer instead of a downloaded NumPy array, so the frame never leaves the GPU.

Example: app.add_cuda_image_live(NodeID.CUDA_NODE, 0, lambda ptr, w, h, pitch, c, depth, device: ...)

Note: This is a synchronous call on the viewer node's own thread - the callback must finish reading the pointer before returning; the engine reuses that buffer on its very next tick. There is no separate release signal like attachNodeInputCudaFrame has on the push-in side.

GPU-Resident (CUDA) Live APIs (advanced)

A separate, additive pair of APIs for working with GPU frames without ever forcing a round-trip through CPU memory. Not used by any generated project automatically - cuda.memory_source and live.viewer.cuda_image are internal node types with no catalog entry (they can't be dragged onto a canvas), so using either API means adding the corresponding node to your own code-generated workflow by hand and calling these methods directly, the same way you'd call addImageLive/add_live_viewer today. Both APIs are safe no-ops when the engine binary in use wasn't built with CUDA support.

  • Push a live frame in (cuda.memory_source node) - two methods, matching the two ways a GPU frame is typically already available to you:
    • setNodeInputCudaFrame (C++) / setNodeInputCudaFrame (Python) - copies the frame in, accepting any pitch. The safe default.
    • attachNodeInputCudaFrame - zero-copy at push time, but requires packed rows (no padding) and a release callback to know when the buffer is free again.
  • Get a live frame out (live.viewer.cuda_image node) - addCudaImageLive (C++) / add_cuda_image_live (Python), the GPU-resident counterpart of addImageLive/ add_live_viewer(..., 'image', ...). The callback is synchronous and receives a device pointer valid only for the duration of the call.

C++

// Push a live CUDA frame in (copy path - accepts any pitch)
app.setNodeInputCudaFrame(NodeID::CUDA_SOURCE, devicePtr, width, height, pitch, numChannels, cvDepthBits, cudaDevice);

// Push a live CUDA frame in (zero-copy path - devicePtr must already be packed)
app.attachNodeInputCudaFrame(NodeID::CUDA_SOURCE, devicePtr, width, height, pitch, numChannels, cvDepthBits, cudaDevice,
    [](void* userData) { /* devicePtr is now safe to reuse/free */ }, nullptr);

// Get a live CUDA frame out
app.addCudaImageLive(NodeID::CUDA_NODE, 0, "live_cuda_0",
    [](const void* devicePtr, int width, int height, int pitch, int numChannels, int cvDepthBits, int cudaDevice) {
        // devicePtr is only valid for the duration of this call
    });

Python

# Push a live CUDA frame in (copy path - accepts any pitch)
app.setNodeInputCudaFrame(NodeID.CUDA_SOURCE, device_ptr, width, height, pitch, num_channels, cv_depth_bits, cuda_device)

# Push a live CUDA frame in (zero-copy path - device_ptr must already be packed)
app.attachNodeInputCudaFrame(NodeID.CUDA_SOURCE, device_ptr, width, height, pitch, num_channels, cv_depth_bits, cuda_device,
    release_callback=lambda: print("device_ptr is now safe to reuse/free"))

# Get a live CUDA frame out
app.add_cuda_image_live(NodeID.CUDA_NODE, 0,
    lambda device_ptr, width, height, pitch, num_channels, cv_depth_bits, cuda_device: None)  # must finish reading device_ptr before returning