IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 150


Ignore:
Timestamp:
Mar 8, 2004, 4:53:06 PM (22 years ago)
Author:
eugene
Message:

fixed enums to adhere to coding standards (psFOO -> PS_FOO)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/include/psImages.h

    r148 r150  
    77// image data type names
    88typedef enum {
    9     psU8  = 1,
    10     psU16 = 2,
    11     psU32 = 3,
    12     psF32 = 4,
    13     psF64 = 5,
    14 } psIMAGE_DEPTH;
     9    PS_U8  = 1,
     10    PS_U16 = 2,
     11    PS_U32 = 3,
     12    PS_F32 = 4,
     13    PS_F64 = 5,
     14} PS_IMAGE_DEPTH;
     15
     16// overlay operations
     17typedef enum {
     18    PS_OVERLAY_EQUALS   = '=',
     19    PS_OVERLAY_ADD      = '+',
     20    PS_OVERLAY_SUBTRACT = '-',
     21    PS_OVERLAY_MULTIPLY = '*',
     22    PS_OVERLAY_DIVIDE   = '/',
     23} PS_OVERLAY_OP;
     24
     25// binary operations (image / vector?)
     26typedef enum {
     27    PS_BINARY_ADD        = '+',
     28    PS_BINARY_SUBTRACT   = '-',
     29    PS_BINARY_MULTIPLY   = '*',
     30    PS_BINARY_DIVIDE     = '/',
     31    PS_BINARY_POWER      = '^',
     32    PS_BINARY_MIN,
     33    PS_BINARY_MAX,
     34    PS_BINARY_LESSTHAN   = '<',
     35    PS_BINARY_MORETHAN   = '>',
     36    PS_BINARY_ISEQUAL    = '==',
     37    PS_BINARY_NOTEQUAL   = '!=',
     38    PS_BINARY_LESSOREQ   = '<=',
     39    PS_BINARY_MOREOREQ   = '>=',
     40    PS_BINARY_AND        = '&&',
     41    PS_BINARY_OR         = '||',
     42    PS_BINARY_BITAND     = '&',
     43    PS_BINARY_BITOR      = '|',
     44    PS_BINARY_XOR        = '~',
     45    PS_BINARY_ATAN2      = 'atan2',
     46} PS_BINARY_OP;
     47
     48// unary image operations
     49typedef enum {
     50    PS_UNARY_IS     = '=',
     51    PS_UNARY_ABS,
     52    PS_UNARY_INT,
     53    PS_UNARY_EXP,
     54    PS_UNARY_TEN,
     55    PS_UNARY_LOG,
     56    PS_UNARY_LN,
     57    PS_UNARY_SQRT,
     58    PS_UNARY_SIN,
     59    PS_UNARY_COS,
     60    PS_UNARY_TAN,
     61    PS_UNARY_DSIN,
     62    PS_UNARY_DCOS,
     63    PS_UNARY_DTAN,
     64    PS_UNARY_ASIN,
     65    PS_UNARY_ACOS,
     66    PS_UNARY_ATAN,
     67    PS_UNARY_DASIN,
     68    PS_UNARY_DACOS,
     69    PS_UNARY_DATAN,
     70    PS_UNARY_RND,
     71    PS_UNARY_NOT,
     72    PS_UNARY_NEGATE = '-',
     73    PS_UNARY_INCR,
     74    PS_UNARY_DECR,
     75    PS_UNARY_ISINF,
     76    PS_UNARY_ISNAN
     77} PS_UNARY_OP;
    1578
    1679// An array of real vectors
     
    2588typedef double         psF64;
    2689
    27 // overlay operations
    28 typedef enum {
    29     psOVERLAY_EQUALS   = '=',
    30     psOVERLAY_ADD      = '+',
    31     psOVERLAY_SUBTRACT = '-',
    32     psOVERLAY_MULTIPLY = '*',
    33     psOVERLAY_DIVIDE   = '/',
    34 } psOVERLAY_OP;
    35 
    36 // binary operations (image / vector?)
    37 typedef enum {
    38     psBINARY_ADD        = '+',
    39     psBINARY_SUBTRACT   = '-',
    40     psBINARY_MULTIPLY   = '*',
    41     psBINARY_DIVIDE     = '/',
    42     psBINARY_POWER      = '^',
    43     psBINARY_MIN,
    44     psBINARY_MAX,
    45     psBINARY_LESSTHAN   = '<',
    46     psBINARY_MORETHAN   = '>',
    47     psBINARY_ISEQUAL    = '==',
    48     psBINARY_NOTEQUAL   = '!=',
    49     psBINARY_LESSOREQ   = '<=',
    50     psBINARY_MOREOREQ   = '>=',
    51     psBINARY_AND        = '&&',
    52     psBINARY_OR         = '||',
    53     psBINARY_BITAND     = '&',
    54     psBINARY_BITOR      = '|',
    55     psBINARY_XOR        = '~',
    56     psBINARY_ATAN2      = 'atan2',
    57 } psBINARY_OP;
    58 
    59 // unary image operations
    60 typedef enum {
    61     psUNARY_IS     = '=',
    62     psUNARY_ABS,
    63     psUNARY_INT,
    64     psUNARY_EXP,
    65     psUNARY_TEN,
    66     psUNARY_LOG,
    67     psUNARY_LN,
    68     psUNARY_SQRT,
    69     psUNARY_SIN,
    70     psUNARY_COS,
    71     psUNARY_TAN,
    72     psUNARY_DSIN,
    73     psUNARY_DCOS,
    74     psUNARY_DTAN,
    75     psUNARY_ASIN,
    76     psUNARY_ACOS,
    77     psUNARY_ATAN,
    78     psUNARY_DASIN,
    79     psUNARY_DACOS,
    80     psUNARY_DATAN,
    81     psUNARY_RND,
    82     psUNARY_NOT,
    83     psUNARY_NEGATE = '-',
    84     psUNARY_INCR,
    85     psUNARY_DECR,
    86     psUNARY_ISINF,
    87     psUNARY_ISNAN
    88 } psUNARY_OP;
    89 
    9090// basic image data structure
    9191typedef struct psImage {
    9292    int nx, ny;                         // size of image
    9393    int x0, y0;                         // data region relative to parent
    94     psIMAGE_DEPTH depth;                // type of image
     94    PS_IMAGE_DEPTH depth;               // type of image
    9595    psF32 **rows;                       // == rows_f32
    9696    psU8  **rows_u8;                    // pointers to psU8 data
     
    111111psAllocImage (int nx,                   // image width
    112112              int ny,                   // image height
    113               psIMAGE_DEPTH depth       // image depth
     113              PS_IMAGE_DEPTH depth      // image depth
    114114    );
    115115
     
    321321psImageBinaryOp (psImage *out,          // destination image (may be NULL)
    322322                 psImage *in1,          // first input image
    323                  psImage *in2,          // second input image
    324                  psBINARY_OP OP         // operator
     323                 PS_BINARY_OP OP,       // operator
     324                 psImage *in2           // second input image
    325325    );
    326326
     
    329329psImageUnaryOp (psImage *out,           // destination image (may be NULL)
    330330                psImage *in1,           // input image
    331                 psUNARY_OP OP           // operator
     331                PS_UNARY_OP OP          // operator
    332332    );
    333333
     
    338338                int x0,                 // x offset of overlay subimage
    339339                int y0,                 // y offset of overlay subimage
    340                 psOVERLAY_OP op         // overlay operation
     340                PS_OVERLAY_OP op        // overlay operation
    341341    );
    342342
Note: See TracChangeset for help on using the changeset viewer.