IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3375 for trunk/stac/src/stac.c


Ignore:
Timestamp:
Mar 4, 2005, 11:37:01 AM (21 years ago)
Author:
Paul Price
Message:

Updated to psLib rel5alpha1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/stac/src/stac.c

    r2897 r3375  
    7777
    7878#ifdef TESTING
    79     char prefile[MAXCHAR];              // Filename of precombined image
    80     sprintf(prefile,"%s.pre",config->output);
    81     psImageWriteSection(combined,0,0,0,NULL,0,prefile);
     79    char preName[MAXCHAR];              // Filename of precombined image
     80    sprintf(preName,"%s.pre",config->output);
     81    psFits *preFile = psFitsAlloc(preName);
     82    if (!psFitsWriteImage(preFile, NULL, combined, 0, NULL)) {
     83        psErrorStackPrint(stderr, "Unable to write image: %s\n", preName);
     84    }
     85    psTrace("stac", 1, "Pre-combined image written to %s\n", preName);
     86    psFree(preFile);
    8287#endif
    8388
     
    8994                                              ((psImage*)(inputs->data[i]))->numRows);
    9095#ifdef TESTING
    91         char regionFile[MAXCHAR];       // Filename of region image
    92         sprintf(regionFile,"%s.region",config->inputs->data[i]);
    93         psImageWriteSection(regions->data[i], 0, 0, 0, NULL, 0, regionFile);
     96        char regionName[MAXCHAR];       // Filename of region image
     97        sprintf(regionName,"%s.region",config->inputs->data[i]);
     98        psFits *regionFile = psFitsAlloc(regionName);
     99        if (!psFitsWriteImage(regionFile, NULL, regions->data[i], 0, NULL)) {
     100            psErrorStackPrint(stderr, "Unable to write image: %s\n", regionName);
     101        }
     102        psTrace("stac", 1, "Region image written to %s\n", regionName);
     103        psFree(regionFile);
    94104#endif
    95105    }
     
    122132
    123133    // Write output image
    124     psImageWriteSection(combined,0,0,0,NULL,0,config->output);
     134    psFits *outFile = psFitsAlloc(config->output);
     135    if (!psFitsWriteImage(outFile, NULL, combined, 0, NULL)) {
     136        psErrorStackPrint(stderr, "Unable to write image: %s\n", config->output);
     137    }
     138    psTrace("stac", 1, "Combined image written to %s\n", config->output);
     139    psFree(outFile);
    125140
    126141    // Free everything I've used
Note: See TracChangeset for help on using the changeset viewer.