IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 20, 2005, 3:40:10 PM (21 years ago)
Author:
drobbin
Message:

made minor changes in accordance with newest api-delta doc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImagePixelManip.c

    r4544 r4589  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-07-12 19:33:49 $
     12 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-07-21 01:40:10 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    187187int psImageOverlaySection(psImage* image,
    188188                          const psImage* overlay,
    189                           int col0,
    190                           int row0,
     189                          int x0,
     190                          int y0,
    191191                          const char *op)
    192192{
     
    229229    overlayNumRows = overlay->numRows;
    230230    overlayNumCols = overlay->numCols;
    231     imageRowLimit = row0 + overlayNumRows;
    232     imageColLimit = col0 + overlayNumCols;
     231    imageRowLimit = y0 + overlayNumRows;
     232    imageColLimit = x0 + overlayNumCols;
    233233
    234234    /* check to see if overlay is within the input image */
    235     if ( row0 < 0 ||
    236             col0 < 0 ||
     235    if ( y0 < 0 ||
     236            x0 < 0 ||
    237237            imageRowLimit > imageNumRows ||
    238238            imageColLimit > imageNumCols) {
     
    240240        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    241241                PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID,
    242                 col0, imageColLimit, row0, imageRowLimit,
     242                x0, imageColLimit, y0, imageRowLimit,
    243243                imageNumCols, imageNumRows);
    244244        return pixelsOverlaid;
     
    247247
    248248    #define psImageOverlayLoop(DATATYPE,OP) { \
    249         for (int row=row0;row<imageRowLimit;row++) { \
     249        for (int row=y0;row<imageRowLimit;row++) { \
    250250            ps##DATATYPE* imageRow = image->data.DATATYPE[row]; \
    251             ps##DATATYPE* overlayRow = overlay->data.DATATYPE[row-row0]; \
    252             for (int col=col0;col<imageColLimit;col++) { \
    253                 imageRow[col] OP overlayRow[col-col0]; \
    254             } \
    255         } \
    256         pixelsOverlaid += (imageRowLimit - row0) * (imageColLimit - col0); \
     251            ps##DATATYPE* overlayRow = overlay->data.DATATYPE[row-y0]; \
     252            for (int col=x0;col<imageColLimit;col++) { \
     253                imageRow[col] OP overlayRow[col-x0]; \
     254            } \
     255        } \
     256        pixelsOverlaid += (imageRowLimit - y0) * (imageColLimit - x0); \
    257257    }
    258258
Note: See TracChangeset for help on using the changeset viewer.