Appendix C - Rayz Internal Operations Parameter Reference

This is the list of built-in image ops (IMs) that can be accessed via a plugin. It also defines the parameters that can be passed to each operation. This is a formatted version of the contents of the header file CPI_InternalOps.h.

The name of the structure type for each operation is the operation with "Parms" appended to it; for example, the declarations for using the "translate" parameter values would be "translateParms", and would look like this:

    CPI_PrivateData  opData = cpiCreatePrivateData( "translate" );
    translateParms  *parms = (translateParms *)opData;

    parms->translate[0] = 0.1;
    parms->translate[1] = 0.0;

    ...
The general form of this is:
    CPI_PrivateData  opData = cpiCreatePrivateData( "imageop" );
    imageopParms  *parms = (imageopParms *)opData;
where "imageop" can be substituted with any of the operation names shown in bold in the second section below.

Types and Constants

CPI_KernelShape:
    BOX
    LINEAR
    QUADRATIC
    CUBIC
    GAUSSIAN
    ERODE
    DILATE

CPI_KernelType:
    INT_KERNEL
    FLOAT_KERNEL

CPI_Edging:
    BLACK
    MIRROR
    BORDER

CPI_MaskType:
    ONOFF
    MIX
    NONE

CPI_EdgeMethod:
    ROBERTS
    SOBEL
    KIRSCH

CPI_FilterOp:
    POINT_SAMPLE
    BILINEAR
    BEST_NATURAL
    BEST_CGI
    FILTERED

CPI_FilterType:
    FILTER_BOX
    FILTER_TRIANGLE
    FILTER_QUADRATIC
    FILTER_CUBIC
    FILTER_CATMULL
    FILTER_MITCHELL
    FILTER_GAUSSIAN
    FILTER_SINC
    FILTER_BESSEL
    FILTER_LANCZOS2
    FILTER_LANCZOS3

CPI_WindowType:
    HANN
    HAMMING
    BLACKMAN
    KAISER

CPI_TransformOrder:
    SRT
    RST
    TSR
    TRS
    STR
    RTS

Image Ops and parameter names

For each internal image op, these are the parameter names and types which may be set. For a list of allowable values for each type, refer to the constants above. For example, to set a filter type for the resize operation, the statement would be:
    parms->filterType = FILTER_TRIANGLE;

Values which are not set by the programmer default to their Rayz default value. Those defaults are not listed here, but they are the same as are seen in the GUI version of Rayz, for each of the given operations. For example, the default blur kernelshape can be seen by dropping a blur node and noting the kernelshape shown in the node parameter area.

Here are the names of the available RAYZ IMs, and the parameters they take:


add
    no parameters


atop
    CPI_Bool     premultiplyA;
    CPI_Bool     premultiplyB;


bitdepth
    CPI_Int32    bitdepth;            // 8, 16 or 32
    CPI_Float32  blackIn[5];
    CPI_Float32  blackOut[5];
    CPI_Float32  whiteIn[5];
    CPI_Float32  whiteOut[5];
    for each of these arrays,
        0 == red component
        1 == green
        2 == blue
        3 == alpha
        4 == other
    eg, blackIn[3] is the alpha channel of the black input parameter


blur
    CPI_Float32      kernelSize[2];        // X and Y values
    CPI_KernelShape  kernelShape;
    CPI_KernelType   kernelType;
    CPI_Edging       edgeType;
    CPI_Int32        size[2];           // Size of the area to blur
    CPI_Int32        offset[2];         // Offset of the area to blur
    CPI_Int32        channelSelect;
    CPI_Int32        maskChannel;
    CPI_MaskType     maskType;
    All sizes are given in pixels


brightness
    CPI_Float32      brightness[5];
    CPI_Float32      offset[5];
    CPI_Int32        channelSelect;
    CPI_Int32        maskChannel;
    CPI_MaskType     maskType;
    for each of the arrays, 
        0 == red
        1 == green
        2 == blue
        3 == alpha
        4 == other


channelswap
    CPI_Int32    outputChannels;
    CPI_Int32    inputChannels[10];

    inputChannels are specified as follows :
    0  = Black
    1  = White
    2  = Input 1 Channel 0
    3  = Input 1 Channel 1
    .. etc ..
    12 = Input 1 Luminance
    13 = Input 2 Channel 0
    14 = Input 2 Channel 1
    .. etc ..
    23 = Input 2 Luminance


chromakey
    CPI_Float32      softness;
    CPI_Float32      hueMin;
    CPI_Float32      hueMax;
    CPI_Float32      saturationMin;
    CPI_Float32      saturationMax;
    CPI_Float32      luminanceMin;
    CPI_Float32      luminanceMax;


color
    CPI_Int32    size[2];              // X & Y in pixels
    CPI_Int32    channels;             // 1-5
    CPI_Int32    bitdepth;             // 8, 16 or 32
    CPI_Float32  color[5];             // 0 == red, 1 == green, etc


contrast
    CPI_Float32      contrast[5];      // 0 == red, 1 == green, etc
    CPI_Float32      pivot[5];
    CPI_Int32        channelSelect;
    CPI_Int32        maskChannel;
    CPI_MaskType     maskType;


convolve
    CPI_Int32        kernelSize[2];
    CPI_Float32     *kernel;
    CPI_Edging       edgeType;
    CPI_Int32        channelSelect;
    CPI_Int32        maskChannel;
    CPI_MaskType     maskType;


diff
    no arguments


dilate
    CPI_Float32  magnitude;
    CPI_Float32  softness;
    CPI_Int32    size[2];               // X & Y values in pixels
    CPI_Int32    offset[2];
    CPI_Int32    channelSelect;
    CPI_Int32    maskChannel;
    CPI_MaskType maskType;


dissolve
    CPI_Float32  dissolve;


edge
    CPI_Int32        kernelSize;
    CPI_EdgeMethod   edgeMethod;
    CPI_Int32        size[2];
    CPI_Int32        offset[2];
    CPI_Edging       edgeType;
    CPI_Int32        channelSelect;
    CPI_Int32        maskChannel;
    CPI_MaskType     maskType;


erode
    CPI_Float32      magnitude;        // values measured in pixels
    CPI_Float32      softness;
    CPI_Int32        size[2];        
    CPI_Int32        offset[2];
    CPI_Int32        channelSelect;
    CPI_Int32        maskChannel;
    CPI_MaskType     maskType;


flip
    CPI_Int32   pivot;                // 0 == X, 1 == Y


gamma
    CPI_Float32  gamma[5];            // 0 == red, 1 == green, etc
    CPI_Int32    channelSelect;
    CPI_Int32    maskChannel;
    CPI_MaskType maskType;


grain
    Grain is not included as a user-callable option in RAYZ 2.2


hueadjust
    CPI_Float32  hue;
    CPI_Float32  saturation;
    CPI_Float32  adjust;
    CPI_Bool     isHSL;             // Otherwise will use HSV space
    CPI_Int32    maskChannel;
    CPI_MaskType maskType;


inside
    CPI_Bool     premultiplyA;


invert
    CPI_Int32    channelSelect;
    CPI_Int32    maskChannel;
    CPI_MaskType maskType;


monochrome
    CPI_Float32  amount;
    CPI_Int32    channelSelect;
    CPI_Int32    maskChannel;
    CPI_MaskType maskType;


multiply
    no arguments


outside
    CPI_Bool     premultiplyA;


over
    CPI_Bool     premultiplyA;
    CPI_Bool     premultiplyB;


resize
    CPI_Float32      scale[2];
    CPI_Float32      blurFactor;
    CPI_Float32      mitchellB;
    CPI_Float32      mitchellC;
    CPI_Float32      kaiserA;
    CPI_FilterOp     filterOp;
    CPI_FilterType   filterType;
    CPI_WindowType   windowType;
    

rotate
    CPI_Float32      rotateZ;
    CPI_Float32      pivot[2];
    CPI_Float32      blurFactor;
    CPI_Float32      mitchellB;
    CPI_Float32      mitchellC;
    CPI_Float32      kaiserA;
    CPI_FilterOp     filterOp;
    CPI_FilterType   filterType;
    CPI_WindowType   windowType;


skew
    CPI_Float32  amount;
    CPI_Bool     horizontal;    // if CPI_FALSE, vertical is assumed


subtract
    no arguments


transform
    CPI_TransformOrder   order;
    CPI_Float32          translation[2];
    CPI_Float32          pivot[2];
    CPI_Float32          rotateZ;
    CPI_Float32          scale[2];
    CPI_Float32          blurFactor;
    CPI_Float32          mitchellB;
    CPI_Float32          mitchellC;
    CPI_Float32          kaiserA;
    CPI_FilterOp         filterOp;
    CPI_FilterType       filterType;
    CPI_WindowType       windowType;


translate
    CPI_Float32      translate[2];
    CPI_Float32      blurFactor;
    CPI_Float32      mitchellB;
    CPI_Float32      mitchellC;
    CPI_Float32      kaiserA;
    CPI_FilterOp     filterOp;
    CPI_FilterType   filterType;
    CPI_WindowType   windowType;


under
    CPI_Bool     premultiplyA;
    CPI_Bool     premultiplyB;


zoom
    CPI_Float32      scale[2];
    CPI_Float32      pivot[2];
    CPI_Float32      blurFactor;
    CPI_Float32      mitchellB;
    CPI_Float32      mitchellC;
    CPI_Float32      kaiserA;
    CPI_FilterOp     filterOp;
    CPI_FilterType   filterType;
    CPI_WindowType   windowType;


[Previous Page] [Next Page]
[Table of Contents] [Index]

Copyright © 2002 Silicon Grail Inc.
736 Seward Street, Hollywood, CA 90038