IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21036


Ignore:
Timestamp:
Dec 18, 2008, 11:02:30 AM (17 years ago)
Author:
eugene
Message:

allow psImageUnbin to go a bit more beyond the edge of the image

File:
1 edited

Legend:

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

    r20766 r21036  
    77 *  @author Eugene Magnier, IfA
    88 *
    9  *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2008-11-17 02:38:43 $
     9 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2008-12-18 21:02:30 $
    1111 *
    1212 *  Copyright 2007 Institute for Astronomy, University of Hawaii
     
    267267    const double y = yIn - in->row0;
    268268
    269     // allow extrapolation one pixel beyong edge of valid pixels, but no further
    270     // (this allows the nXskip,nYskip boundary areas to be used as well)
    271     if ((x < -1) || (x > in->numCols) || (y < -1) || (y > in->numRows)) {
     269    // allow extrapolation a small distance beyond the edge of valid pixels, but no
     270    // further (this allows the nXskip,nYskip boundary areas to be used as well)
     271    int nXedge = 0.125*in->numCols;
     272    int nYedge = 0.125*in->numRows;
     273
     274    if ((x < -nXedge) || (x > in->numCols + nXedge) || (y < -nYedge) || (y > in->numRows + nYedge)) {
    272275        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Point (%f,%f) lies outside binned image", x, y);
    273276        return NAN;
Note: See TracChangeset for help on using the changeset viewer.