IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 9, 2005, 4:30:47 PM (21 years ago)
Author:
desonia
Message:

changed psImageCut & psImageSlice to use psRegion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/image/psImagePixelExtract.c

    r3968 r4206  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-05-19 02:08:21 $
     10 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-06-10 02:30:47 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2828                       const psImage* restrict mask,
    2929                       psU32 maskVal,
    30                        psS32 col0,
    31                        psS32 row0,
    32                        psS32 col1,
    33                        psS32 row1,
     30                       psRegion region,
    3431                       psImageCutDirection direction,
    3532                       const psStats* stats)
     
    4239    psS32 delta = 1;
    4340    psF64* outData;
     41    psS32 row0 = region.y0;
     42    psS32 row1 = region.y1;
     43    psS32 col0 = region.x0;
     44    psS32 col1 = region.x1;
    4445
    4546    if (in == NULL || in->data.V == NULL) {
     
    271272                     psVector* cutRows,
    272273                     const psImage* in,
    273                      const psImage* restrict mask,
     274                     const psImage* mask,
    274275                     psU32 maskVal,
    275                      float startCol,
    276                      float startRow,
    277                      float endCol,
    278                      float endRow,
     276                     psRegion region,
    279277                     psU32 nSamples,
    280278                     psImageInterpolateMode mode)
    281279{
     280
    282281    if (in == NULL || in->data.V == NULL) {
    283282        psError(PS_ERR_BAD_PARAMETER_NULL, true,
     
    297296    }
    298297
     298    float startCol = region.x0;
     299    float startRow = region.y0;
     300    float endCol = region.x1;
     301    float endRow = region.y1;
    299302    if (startCol < 0 || startCol >= numCols ||
    300303            startRow < 0 || startRow >= numRows ||
Note: See TracChangeset for help on using the changeset viewer.