IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31332 for trunk/psModules


Ignore:
Timestamp:
Apr 21, 2011, 10:47:55 AM (15 years ago)
Author:
eugene
Message:

an image with peaks and no footprints is not an error, we simply create footprints for those peaks

Location:
trunk/psModules/src/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmFootprintAssignPeaks.c

    r31153 r31332  
    3535    assert (peaks->n == 0 || psMemCheckPeak(peaks->data[0]));
    3636   
    37     if (footprints->n == 0) {
    38         if (peaks->n > 0) {
    39             return psError(PS_ERR_BAD_PARAMETER_SIZE, true, "Your list of footprints is empty");
    40         }
     37    if ((footprints->n == 0) && (peaks->n == 0)) {
    4138        return PS_ERR_NONE;
    4239    }
     40
    4341    /*
    4442     * Create an image filled with the object IDs, and use it to assign pmPeaks to the
     
    5957       
    6058        if (ids) { assert (x >= 0 && x < numCols && y >= 0 && y < numRows);}
    61         int id = ids ? ids->data.S32[y][x - col0] : 0;
    62         // XXX I think the '[x - col0]' above is just wrong (should be [x], but never gets triggerd.
     59        int id = ids ? ids->data.S32[y][x] : 0;
    6360
    6461        if (id == 0) {                  // peak isn't in a footprint, so make one for it
  • trunk/psModules/src/objects/pmFootprintIDs.c

    r31153 r31332  
    6666
    6767   if (footprints->n == 0) {
    68        // XXX this was an error, but is an allowed condition -- NULL returned image means no footprints for any peaks
    69        // psError(PS_ERR_BAD_PARAMETER_SIZE, true, "You didn't provide any footprints");
    7068       return NULL;
    7169   }
Note: See TracChangeset for help on using the changeset viewer.