Example: Convert Matrix to Gray Scale Image with Fixed Range
EXECUTE FUNCTION TD_MATRIX2IMAGE ( MATRIX_SPEC ( TABLE_NAME( matrixTable ), MATRIX_ID( id ), ROW_AXIS (SEQUENCE( y )), COLUMN_AXIS (SEQUENCE (x)), PAYLOAD ( FIELDS (GRAY), CONTENT (REAL) ) ), FUNC_PARAMS ( RANGE (0, 255) ) );
It was not necessary to specify TYPE because a single payload was used in the command.
Example: Convert Matrix to Gray Scale Image with Automatic Range
EXECUTE FUNCTION TD_MATRIX2IMAGE ( MATRIX_SPEC ( TABLE_NAME( matrixTable ), MATRIX_ID( id ), ROW_AXIS (SEQUENCE( y )), COLUMN_AXIS (SEQUENCE (x)), PAYLOAD ( FIELDS (GRAY), CONTENT (REAL) ) ) );
This TD_MATRIX2IMAGE command had the function determine the range, so it was not necessary to specify FUNC_PARAMS.
Example: Convert Matrix to Colormap Image
EXECUTE FUNCTION TD_MATRIX2IMAGE ( MATRIX_SPEC ( TABLE_NAME( matrixTable ), MATRIX_ID( id ), ROW_AXIS (SEQUENCE( y )), COLUMN_AXIS (SEQUENCE (x)), PAYLOAD ( FIELDS (GRAY), CONTENT (REAL) ) ), FUNC_PARAMS ( TYPE ('colormap'), COLORMAP ('viridis'), RANGE (0, 255) ) );
Example: Convert Matrix to RGB Image with All Channels Range Fixed
TD_MATRIX2IMAGE ( MATRIX_SPEC ( TABLE_NAME( matrixTable ), MATRIX_ID( id ), ROW_AXIS (SEQUENCE( y )), COLUMN_AXIS (SEQUENCE (x)), PAYLOAD ( FIELDS (RED, GREEN, BLUE), CONTENT (MULTIVAR_REAL) ) ), FUNC_PARAMS ( RED (0, 255), GREEN (0, 255), BLUE (0, 255) ) );
It was not necessary to specify TYPE (RGB) because there are three payloads.
Example: Convert Matrix to RGB Image with Automatic Range for All Channels
EXECUTE FUNCTION TD_MATRIX2IMAGE ( MATRIX_SPEC ( TABLE_NAME( matrixTable ), MATRIX_ID( id ), ROW_AXIS (SEQUENCE( y )), COLUMN_AXIS (SEQUENCE (x)), PAYLOAD ( FIELDS (RED, GREEN, BLUE), CONTENT (MULTIVAR_REAL) ) ) );