Groups
Group nodes in the charon suite are nodes which internally load work flows we call child-work-flows and interface these to the work-flow containing the group node, called the parent-work-flow. These nodes are intended to simplify the parent-workflow by combining redundant functionality into simple nodes. In this howto we will create a simple group that convert an optical flow field to a HSV image for visualization purposes. Create a new file called "Group-parent.wrp". Groups are implemented in the GroupObject plugin. Browse for "GroupObject" in the module collection
Module Collection
and drag&drop it into the work-flow, giving it the name "flow_to_hsv"
Empty Group
You see it has no input or output slots and it does nothing upon execution of the work-flow. Its parameters in the
ObjectInspector look like
Parameters of flow_to_hsv group
To give the group the intended functionality one must set the parameter workflowfile to the path of a suitable child-workflow which we will construct now.
In the tool bar select new file to start a new workflow. Save the workflow under the name "FlowQuiverHSV.wrp" From the Module Collection select the plugin "InputSlotBundle" and drag it into FlowQuiverHSV, followed by "OutputSlotBundle" Name the InputSlotBundle "flow_input" and the OutputSlotBundle "flow_quiver_hsv_ouput"
Slot Bundles
Each slotBundle has a parameter called num_slots which is by default 0. Set num_slots of both SlotBundles to 1. The flow_input
SlotBundle gets an output slot called VirtualSlot-out0 and the flow_quiver_hsv_output get an input slot called VirtualSlot-in0.
Slot Bundles
Go back to the Group-parent workflow containing the
GroupObject flow_to_hsv and select flow_to_hsv to view its parameters. In the
ObjectInspector enter the path of the charon-plugins into the parameter plugin_paths. You can copy this string from the options dialog in tuchulcha.
Parameters of flow_to_hsv group
Next enter the path to the child workflow you created, FlowQuiverHSV.wrp in the parameter workflowfile
Parameters of flow_to_hsv group
The
GroupObject flow_to_hsv should change its interface and aquire an input slot called "VirtualSlot-in0" and an output slot called "VirtualSlot-out0"
flow_to_hsv group with in- and output slots
We load a FileReader module, call it "flow", and connect it to "VirtualSlot-in0" of "flow_to_hsv". Following this we load an ArgosDisplay module with the default name and connect its "cimgIn" input slot to "VirtualSlot-out0" of "flow_to_hsv".
flow_to_hsv group connected to FileReader and ArgosDisplay
Set the filename parameter of the FileReader to a flow file (e.g yosemiteFlow.cimg). The FileReader "flow" reads in the flow data and passes a referrence to it to "VirtualSlot-in0". In FlowQuiverHSV.wrp the referrence to the flow data is available through "VirtualSlot-in0" of the input slot bundle "flow_input". It must be processed and the results connected to "VirtualSlot-out0" of "flow_quiver_hsv_output". Therefore we load the modules Flow2HSV, FlowQuiver and ChannelConverter with default names and parameters into FlowQuiverHSV.wrp and connect them the following way
Complete FlowQuiverHSV.wrp
Switch to Group-parent.wrp workflow and reload it. The names and the types of the slots of "flow_to_hsv" have changed to those of the slots connected to the in- and output slot bundles in FlowQuiverHSV.wrp
Complete Group-parent.wrp
The workflow Group-parent.wrp is now executable. It computes the HSV image of the given flow and displays it in a window
Resulting HSV image
Conclusion
This howto has shown how to group objects into a child workflow (called FlowQuiverHSV.wrp) and load that workflow into a GroupObject (called flow_to_hsv) of a parent workflow (called Group-parent.wrp). The example computes the HSV image of a given workflow and displays it in a window.