Operator Library: Synchronization
The operator CutLine dynamically cuts lines of an input image into a number of shorter lines. Cutting is controlled by the input Cut, which is synchronous to input I. Cutting is done at the granularity given by parallelism P. Therefore, no dummy pixels are generated. When a pixel value at input Cut is 1, the corresponding pixel from input I is still contained in the output of the current line. The line is terminated after the next possible pixel position so the granularity condition is met. The operator supports two cutting modes which are set by the parameter Mode:
-
If Mode is set to Split (default), the incoming lines are split into several pieces. Whenever a pixel of the current line at input Cut has the value 1, the ongoing output line is terminated at the granularity given by parallelism P. A new line is then started with the beginning of the next incoming pixels. Any value of 1 in the last parallelism P pixels of a line has no effect.
-
If Mode is set to Truncate, the incoming line is cut to a single line which may be shorter than the incoming line. Whenever a pixel of the current line at input Cut has the value 1, the ongoing output line is terminated at the granularity given by parallelism P. No further pixels are forwarded to the output O until the end of the current line.
The operator might generate output images with different line lengths. Not all VisualApplets operators can process images using varying line lengths.
You can also use the CutLine operator to convert a 0D image into a 1D image. The conversion is automatically performed, if a link using the image protocol VALT_PIXEL0D is connected to the operator's input. In this case the operator is always in Split mode and the parameter Mode is disabled.
Property | Value |
---|---|
Operator Type | M |
Input Links | I, data input Cut, control input |
Output Link | O, data output |
The range of the input bit width is:
|
|
If VALT_IMAGE2D or VALT_LINE1D is used, the output image protocol is the same as the input image protocol. If VALT_PIXEL0D image protocol is used at the input, the operator converts the image into the VALT_LINE1D image protocol. |
|
The output maximum image width has to be less than or equal to the input maximum image width. |
|
The output maximum image height has to be greater than or equal to the input image height. |
Mode | |
---|---|
Type | static read/write parameter |
Default | Split |
Range | {Split,Truncate} |
Operation mode.
|
The use of operator CutLine is shown in the following examples:
-
'Functional Example for Specific Operators of Library Synchronization: Dynamic Append and Cut'
Examples - Demonstration of how to use the operator