![]() |
VisionWorks Toolkit ReferenceDecember 18, 2015 | 1.2 Release |
This section illustrates the implementation of the user custom node factory.
Creating a node factory function for each of the registered custom kernels is good programming practice since it allows the application to create a custom node similar to the way it creates standard nodes.
The best convention for a custom node factory function is to have a Object: Graph as the first argument, followed by the node parameters in the order they were declared in the custom kernel. It gives for the example discussed in this tutorial the following prototype:
The purpose of the node factory function is to create a node object and return its reference; this is done in 3 steps:
5.1. Get kernel object by its identifier
5.2. Create node object from the kernel object
5.3. Set node parameters