IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 14, 2004, 8:08:14 AM (22 years ago)
Author:
harman
Message:

Tried to cleanup astyle's incorrect formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/pmFlatField.c

    r1803 r1804  
    1515 *  @author Ross Harman, MHPCC
    1616 *
    17  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    18  *  @date $Date: 2004-09-14 18:04:31 $
     17 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     18 *  @date $Date: 2004-09-14 18:08:14 $
    1919 *
    2020 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    9595
    9696    // Macro for all PS types
    97     #define PM_FLAT_DIVISION(TYPE)                                                                   \
    98 case PS_TYPE_##TYPE:                                                                                 \
    99     for(j = inImage->row0; j < inImage->numRows; j++) {                                              \
    100         for(i = inImage->col0; i < inImage->numCols; i++) {                                          \
    101             if(creal(flatImage->data.TYPE[j][i]) <= 0.0) {                                           \
    102                 /* Negative or zero flat pixels shall be masked in input image as  PM_MASK_FLAT */   \
    103                 inMaskImage->data.F64[j][i] = PM_MASK_FLAT;                                          \
    104             } else if(flatMaskImage->data.TYPE[j][i]){                                               \
    105                 /* Pixels masked in the flat shall be masked with same values in the output */       \
    106                 inMaskImage->data.TYPE[j][i] = flatMaskImage->data.TYPE[j][i];                       \
    107             }                                                                                        \
    108             if(creal(flatImage->data.TYPE[j][i]) < 0.0) {                                            \
    109                 /* Negative pixels from the flat image may be set to zero */                         \
    110                 inImage->data.TYPE[j][i] = 0.0                                                       \
    111                                        } else if(fabs(flatImage->data.TYPE[j][i]) < FLT_EPSILON) {                              \
    112                                            psError(__func__, " : Line %d - Divide by zero. Row: %d Col: %d",__LINE__, j, i);    \
    113                                        } else {                                                                                 \
    114                                            /* Module shall divide the input image by the flat-fielded image */                  \
    115                                            inImage->data.TYPE[j][i] = inImage->data.TYPE[j][i]/flatImage->data.TYPE[j][i];      \
    116                                        }                                                                                        \
    117                                    }                                                                                            \
    118                                }                                                                                                \
    119                                break;
     97    #define PM_FLAT_DIVISION(TYPE)                                                                           \
     98case PS_TYPE_##TYPE:                                                                                         \
     99    for(j = inImage->row0; j < inImage->numRows; j++) {                                                      \
     100        for(i = inImage->col0; i < inImage->numCols; i++) {                                                  \
     101            if(creal(flatImage->data.TYPE[j][i]) <= 0.0) {                                                   \
     102                /* Negative or zero flat pixels shall be masked in input image as  PM_MASK_FLAT */           \
     103                inMaskImage->data.F64[j][i] = PM_MASK_FLAT;                                                  \
     104            } else if(flatMaskImage->data.TYPE[j][i]){                                                       \
     105                /* Pixels masked in the flat shall be masked with same values in the output */               \
     106                inMaskImage->data.TYPE[j][i] = flatMaskImage->data.TYPE[j][i];                               \
     107            }                                                                                                \
     108            if(creal(flatImage->data.TYPE[j][i]) < 0.0) {                                                    \
     109                /* Negative pixels from the flat image may be set to zero */                                 \
     110                inImage->data.TYPE[j][i] = 0.0;                                                              \
     111            } else if(fabs(flatImage->data.TYPE[j][i]) < FLT_EPSILON) {                                      \
     112                psError(__func__, " : Line %d - Divide by zero. Row: %d Col: %d",__LINE__, j, i);            \
     113            } else {                                                                                         \
     114                /* Module shall divide the input image by the flat-fielded image */                          \
     115                inImage->data.TYPE[j][i] = inImage->data.TYPE[j][i]/flatImage->data.TYPE[j][i];              \
     116            }                                                                                                \
     117        }                                                                                                     \
     118    }                                                                                                         \
     119    break;
    120120
    121121    switch(inType) {
Note: See TracChangeset for help on using the changeset viewer.