IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14125


Ignore:
Timestamp:
Jul 10, 2007, 3:28:39 PM (19 years ago)
Author:
Paul Price
Message:

Shouldn't use 'x' and 'y' in the macro, since these are defined outside, and it clobbers them.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmSubtraction.c

    r14106 r14125  
    44 *  @author GLG, MHPCC
    55 *
    6  *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
    7  *  @date $Date: 2007-07-10 23:54:26 $
     6 *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
     7 *  @date $Date: 2007-07-11 01:28:39 $
    88 *
    99 *  Copyright 2004-2007 Institute for Astronomy, University of Hawaii
     
    285285          break; \
    286286      } \
    287             case PM_SUBTRACTION_KERNEL_ISIS: { \
     287      case PM_SUBTRACTION_KERNEL_ISIS: { \
    288288          psKernel *kernel = (KERNELS)->preCalc->data[(INDEX)]; /* The convolution kernel */ \
    289289          psKernel *subKernel = (KERNELS)->preCalc->data[(KERNELS)->subIndex]; /* Kernel to subtract */ \
     
    291291          double sum = 0.0;             /* Accumulated sum from convolution */ \
    292292          double sub = 0.0;             /* Accumulated sum to subtract */ \
    293           for (int v = -size, y = (Y) - size; v <= size; v++, y++) { \
    294               for (int u = -size, x = (X) - size; u <= size; u++, x++) { \
    295                   sum += FUNC(kernel->kernel[v][u]) * (IMAGE)->data.F32[y][x]; \
     293          for (int v = -size, yLocation = (Y) - size; v <= size; v++, yLocation++) { \
     294              for (int u = -size, xLocation = (X) - size; u <= size; u++, xLocation++) { \
     295                  sum += FUNC(kernel->kernel[v][u]) * (IMAGE)->data.F32[yLocation][xLocation]; \
    296296                  /* The (0,0) kernel is subtracted from other kernels to preserve photometric scaling */ \
    297297                  if ((KERNELS)->spatialOrder > 0 && (INDEX) != (KERNELS)->subIndex) { \
    298                       sub += FUNC(subKernel->kernel[v][u]) * (IMAGE)->data.F32[y][x]; \
     298                      sub += FUNC(subKernel->kernel[v][u]) * (IMAGE)->data.F32[yLocation][xLocation]; \
    299299                  } \
    300300              } \
Note: See TracChangeset for help on using the changeset viewer.