IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20580


Ignore:
Timestamp:
Nov 7, 2008, 3:03:55 PM (18 years ago)
Author:
bills
Message:

clip when excising pixels so that the code that calculates the streak
pixels doesn't have to

Location:
trunk/magic/remove/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/magic/remove/src/Makefile.simple

    r20520 r20580  
    1313streaksremove:  ${OBJECTS}
    1414
    15 install:
     15install:        streaksremove
    1616        cp streaksremove $(PSCONFDIR)/$(PSCONFIG)/bin
    1717        chmod 755  $(PSCONFDIR)/$(PSCONFIG)/bin/streaksremove
  • trunk/magic/remove/src/streaksremove.c

    r20573 r20580  
    12441244excisePixel(streakFiles *sfiles, unsigned int x, unsigned int y, double newMaskValue)
    12451245{
     1246    // we clip so that the streak calculation code doesn't have to
     1247    if ((x < 0) || (x >= sfiles->inImage->numCols) || (y < 0) || (y >= sfiles->inImage->numRows)) {
     1248        return;
     1249    }
     1250
    12461251    double imageValue  = psImageGet (sfiles->inImage->image,  x, y);
    12471252    psImageSet (sfiles->recImage->image,  x, y, imageValue);
     
    13161321    }
    13171322
     1323    // we clip so that the streak calculation code doesn't have to
     1324    if ((cellCoord->x < 0) || (cellCoord->x >= sfiles->inImage->numCols) ||
     1325        (cellCoord->y < 0) || (cellCoord->y >= sfiles->inImage->numRows)) {
     1326        return false;
     1327    }
     1328
    13181329    cellToChip(&chipCoord, sfiles->astrom, cellCoord);
     1330
    13191331
    13201332    return psImageGet(sfiles->warpedPixels, chipCoord.x, chipCoord.y) ? true : false;
Note: See TracChangeset for help on using the changeset viewer.