Operator CutLine

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.

I/O Properties

Property Value
Operator Type M
Input Links I, data input
Cut, control input
Output Link O, data output

Supported Link Format

Link Parameter Input Link I Input Link Cut Output Link O
Bit Width [1, 64]1 1 as I
Arithmetic {unsigned, signed} unsigned as I
Parallelism any as I as I
Kernel Columns any 1 as I
Kernel Rows any 1 as I
Img Protocol {VALT_IMAGE2D, VALT_LINE1D, VALT_PIXEL0D} as I auto2
Color Format any VAF_GRAY as I
Color Flavor any FL_NONE as I
Max. Img Width any as I any3
Max. Img Height any as I any4

1

The range of the input bit width is:

  • For unsigned inputs: [1, 64]

  • For signed inputs: [2, 64]

  • For unsigned color inputs: [3, 63]

  • For signed color inputs: [6, 63].

2

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.

3

The output maximum image width has to be less than or equal to the input maximum image width.

4

The output maximum image height has to be greater than or equal to the input image height.

Parameters

Mode
Type static read/write parameter
Default Split
Range {Split,Truncate}

Operation 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 and a new line is 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.

Examples of Use

The use of operator CutLine is shown in the following examples: