Top
Menu

POF-ML

Rendering

Here is listed and described the PUs of the rendering category.

cls - Classification

The cls PU performs a rendering of a single sample PU by defining all the digital numbers to render.

Syntax

cls(child,clsId)

Input

This PU takes in input one PU with one sample per pixel. The expected data type is integer.

Parameters

  • child - is the child PU.
  • clsId - is a custom string defining the color and value with the following format "color1_color2_..._colorN" where colorX is rrggbb/DN:
    • rr - is the red channel value in hexadecimal.
    • gg - is the green channel value in hexadecimal.
    • bb - is the blue channel value in hexadecimal.
    • DN - is the input digital number to be associated to this color.

Output

The output is a PU with three (3) unsigned int samples per pixel (0 for background).

Example(s)

cls(...,7cb342/1_005b9f/2_0288d1/3_5eb8ff/4)

lut - Lookup table

The lut PU performs rendering of a single sample PU using a predefined or a user defined lookup table.

Syntax

lut(child,lutId,min,max,func[,shadowing,matrixId,gain])

Input

This PU takes in input one PU with one sample per pixel.

Parameters

  • child - is the child PU.
  • lutId - is the predifind lut identifier or a user defined lut.
  • min - is the input minimum value to be rendered.
  • max - is the input maximum value to be rendered.
  • func - is the function to be applied before retrieving the lut values:
    • "0", "linear" - linear function (the value are unchanged),
    • "1", "cyclic" - cyclic linear function (the min/max range is repeated),
    • "2", "log" - natural logarithm function,
    • "3", "exp" - exponential function.
  • shadowing - is a boolean that indicates if a shadowing should be performed (1) or not (0). Optional, default value is 0.
  • matrixId - is the direction of the shadowing ("N", "NE", "E", "SE", "S", "SW", "W" and "NW"). Mandatory if "shadowing" is set to "1".
  • gain - is the gain applied to the shadowing. Mandatory if "shadowing" is set to "1".

For a user defined lut, the lutId parameter is the linear gradient ones set with the following syntax "lng_color1_color2_..._colorN" where colorX is [tt]rrggbb[/pos]:

  • tt - is the optional transparency in hexadecimal (FF is opaque, 00 is transparent),
  • rr - is the red channel value in hexadecimal,
  • gg - is the green channel value in hexadecimal,
  • bb - is the blue channel value in hexadecimal,
  • pos - is the optional position of the colour in the lookup table (between 0 and 100). If there is no position set, the colours will be evenly distributed.

Output

The output is a PU with three (3) or four (4) unsigned int samples per pixel (0 for background).

Example(s)

lut(...,lng_7cb342/1_005b9f/2_0288d1/3_5eb8ff/4,-10,10,0)

lut(...,lng_a50026/33_ffffff/33_ffffff/66_097940/66,0,2000,0)

neg - Negative

The neg PU computes the negative values of the input PU.

Syntax

neg(child)

Input

This PU takes in input one PU with one or more samples per pixel. The expected data type is integer.

Parameters

  • child - is the child PU.

Output

The output is a PU with the same data type and number of sample per pixel as in input.

rgb - Red / Green / Blue

The rgb PU put 3 input PUs together in a red green blue composite.

Syntax

rgb(red,green,blue)

Input

This PU takes in input three PUs with one sample per pixel. The expected data type is integer.

Parameters

  • red - is the child PU that will be affected to the red channel.
  • green - is the child PU that will be affected to the green channel.
  • blue - is the child PU that will be affected to the blue channel.

Output

The output is a PU with three (3) unsigned int samples per pixel (0 for background).

trim - Trim

The trim PU clears all the pixels with partial background. For a pixel with n samples, if one of the sample is equal to the background value, then all the sample will be turned to background.

Syntax

trim(child)

Input

This PU takes in input one PU with two or more samples per pixel.

Parameters

  • child - is the child PU.

Output

The output is a PU with the same number of sample per pixel and the same data type.

uv - UV field

The uv PU allows the rendering of vector field using two PUs in input as a U-component (from left to right) and V-component (from bottom to top).

Syntax

uv(childU,childV,min,max,vector,lutId,cyclic,vectorStyle,vectorColor,vectorSpacing,grid)

Input

This PU takes in input two PUs with one sample per pixel.

Parameters

  • childX - is the child PU used as the U-component.
  • childY - is the child PU used as the V-component.
  • min - is the input minimum value to be rendered.
  • max - is the input maximum value to be rendered.
  • vector - is the string which defines what will be rendered ("i" for intensity, "v" for vector and "iv" for both).
  • lutId - is the predifind lut identifier or a user defined lut.
  • cyclic - is a boolean defining if the lut is cyclic (1) or not (0).
  • vectorStyle - is the type of rendering for the vectors between "arrow" and "upstream_dot".
  • vectorColor - is the colour of the vector in rrggbb hexadecimal format.
  • vectorSpacing - is the space between the vector in pixels.
  • grid - is the grid format for the vectors between "rectangular" and "hexagonal".

Output

The output is a PU with three (3) unsigned int samples per pixel (0 for background).

vec - Vector field

The vec PU allows the rendering of vector field using one PU in input in cartesian or polar system.

Syntax

vec(child,isPolar,min,max,vector,lutId,cyclic,vectorStyle,vectorColor,vectorSpacing,grid[,useAlpha,min,max,alphaMin,alphaMax])

Input

This PU takes in input one PU with two or three samples per pixel.

Parameters

  • childX - is the child PU used as the U-component.
  • isPolar - is a boolean that indicates if the child is in polar system (1) or in cartesian system (0).
  • min - is the input minimum value to be rendered.
  • max - is the input maximum value to be rendered.
  • vector - is the string which defines what will be rendered ("i" for intensity, "v" for vector and "iv" for both).
  • lutId - is the predifind lut identifier or a user defined lut.
  • cyclic - is a boolean defining if the lut is cyclic (1) or not (0).
  • vectorStyle - is the type of rendering for the vectors between "arrow" and "upstream_dot".
  • vectorColor - is the colour of the vector in rrggbb hexadecimal format.
  • vectorSpacing - is the space between the vector in pixels.
  • grid - is the grid format for the vectors between "rectangular" and "hexagonal".

If there is 3 samples per pixel in input the following optional parameters could be set:

  • useAlpha - is a boolean that indicates whether the third sample should be used for transparency computation (1) or not (0).
  • min - is the input minimum value mapped to alphaMin.
  • max - is the input maximum value mapped to alphaMax.
  • alphaMin - is minimum alpha value (between 0 and 1).
  • alphaMax - is maximum alpha value (between 0 and 1).

Output

The output is :

  • if useAlpha = 0 - a PU with three (3) unsigned int samples per pixel (0 for background)
  • if useAlpha = 1 - a PU with four (4) unsigned int samples per pixel (0 for background)