IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

Added more module code

File:
1 edited

Legend:

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

    r1802 r1803  
    1515 *  @author Ross Harman, MHPCC
    1616 *
    17  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    18  *  @date $Date: 2004-09-14 02:29:27 $
     17 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     18 *  @date $Date: 2004-09-14 18:04:31 $
    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)                                                                           \
     97    #define PM_FLAT_DIVISION(TYPE)                                                                   \
    9898case PS_TYPE_##TYPE:                                                                                 \
    9999    for(j = inImage->row0; j < inImage->numRows; j++) {                                              \
     
    107107            }                                                                                        \
    108108            if(creal(flatImage->data.TYPE[j][i]) < 0.0) {                                            \
    109                 /* Negative pixels in the flat may be set to zero */                                 \
    110                 inImage->data.TYPE[j][i] = 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;
     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.