IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 30, 2012, 2:49:37 PM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/pstamp/src/ppstampMakeStamp.c

    r30050 r33638  
    233233    int status = false;
    234234
    235     pmFPAfile *output;
    236     if (!options->stage || (strcmp(options->stage, "diff") != 0)) {
    237         output = psMetadataLookupPtr(NULL, config->files, "PPSTAMP.OUTPUT");
    238     } else {
    239         output = psMetadataLookupPtr(NULL, config->files, "PPSTAMP.OUTPUT.DIFF");
    240     }
     235    pmFPAfile *output = psMetadataLookupPtr(NULL, config->files, options->outputFileRule);
    241236    if (!output) {
    242237        psError(PS_ERR_UNKNOWN, false, "Can't find output data\n");
     
    529524        // If no chip name was specified, select this one (the first one that had data)
    530525        if ((options->chipName == NULL) || !strcasecmp(chipName, options->chipName)) {
    531             psLogMsg("ppstampMakeStamp", 2, "Center on chip: %s\n", chipName);
    532             center->chip->x = options->roip.centerX;
    533             center->chip->y = options->roip.centerY;
     526            if (options->chipName) {
     527                psLogMsg("ppstampMakeStamp", 2, "Center on chip: %s\n", chipName);
     528            }
     529            if (options->wholeFile) {
     530                center->chip->x = (chipBounds->x1 + chipBounds->x0 + 1) / 2;
     531                center->chip->y = (chipBounds->y1 + chipBounds->y0 + 1) / 2;
     532            } else {
     533                center->chip->x = options->roip.centerX;
     534                center->chip->y = options->roip.centerY;
     535            }
    534536            center->chip->xErr = 0;
    535537            center->chip->yErr = 0;
     
    543545            findBoundingBox(options, input->fpa, chip, center);
    544546        } else {
    545             int width  = options->roip.dX;
    546             int height = options->roip.dY;
    547             if (width > 5000) {
    548                 fprintf(stderr, "requested width %d too large reducing to 5000\n", width);
    549                 width = 5000;
     547            if (options->wholeFile) {
     548                options->roi = *chipBounds;
     549            } else {
     550                int width  = options->roip.dX;
     551                int height = options->roip.dY;
     552                if (width > 7000) {
     553                    fprintf(stderr, "requested width %d too large reducing to 7000\n", width);
     554                    width = 7000;
     555                }
     556                if (height > 7000) {
     557                    fprintf(stderr, "requested height %d too large reducing to 7000\n", height);
     558                    height = 7000;
     559                }
     560
     561                // calculate the ROI in chip coordinates
     562                options->roi.x0 = center->chip->x - width / 2;
     563                options->roi.x1 = options->roi.x0 + width;
     564                options->roi.y0 = center->chip->y - height / 2;
     565                options->roi.y1 = options->roi.y0 + height;
    550566            }
    551             if (height > 5000) {
    552                 fprintf(stderr, "requested height %d too large reducing to 5000\n", height);
    553                 height = 5000;
    554             }
    555 
    556             // calculate the ROI in chip coordinates
    557             options->roi.x0 = center->chip->x - width / 2;
    558             options->roi.x1 = options->roi.x0 + width;
    559             options->roi.y0 = center->chip->y - height / 2;
    560             options->roi.y1 = options->roi.y0 + height;
    561         }
    562 
    563 
    564         if (regionContainsRegion(chipBounds, &options->roi)) {
    565             // returnval = findCell(view, options, input, center, ppCell);
     567        }
     568
     569
     570        if (options->wholeFile || regionContainsRegion(chipBounds, &options->roi)) {
    566571            psLogMsg("ppstampMakeStamp", 2, "ROI contained on: %s\n", chipName);
    567572            returnval = PPSTAMP_ON;
Note: See TracChangeset for help on using the changeset viewer.