IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 30, 2006, 5:20:55 PM (20 years ago)
Author:
Paul Price
Message:

Adding MD5 for component images to output.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppImageLoop.c

    r10335 r10364  
    125125            }
    126126
     127            // Add MD5 information for cell
     128            pmHDU *hdu = pmHDUFromCell(cell); // HDU that owns the cell
     129            while ((readout = pmFPAviewNextReadout(view, input->fpa, 1)) != NULL) {
     130                const char *chipName = psMetadataLookupStr(NULL, chip->concepts, "CHIP.NAME");
     131                const char *cellName = psMetadataLookupStr(NULL, cell->concepts, "CELL.NAME");
     132
     133                psString headerName = NULL; // Header name for MD5
     134                psStringAppend(&headerName, "MD5_%s_%s_%d", chipName, cellName, view->readout);
     135
     136                psVector *md5 = psImageMD5(readout->image); // md5 hash
     137                psString md5string = psMD5toString(md5); // String
     138                psFree(md5);
     139                psMetadataAddStr(hdu->header, PS_LIST_TAIL, headerName, PS_META_DUPLICATE_OK,
     140                                 "Image MD5", md5string);
     141                psFree(md5string);
     142                psFree(headerName);
     143            }
     144
    127145            if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) {
    128146                return false;
Note: See TracChangeset for help on using the changeset viewer.