IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 30, 2007, 9:54:15 AM (19 years ago)
Author:
Paul Price
Message:

Not sure why the header copying was ifdef-ed out (perhaps I was
concerned about memory leaks, but there doesn't seem to be any ---
they were coming from somewhere else). Restoring it for now, and
making sure the header is created if it doesn't exist.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPACopy.c

    r11255 r11435  
    3737}
    3838
    39 #if 0
     39#if 1
    4040// Find the blank (image-less) PHU, given a cell.
    4141static pmHDU *findBlankPHU(const pmCell *cell // The cell for which to find the PHU
     
    279279    binItem->data.S32 *= yBin;
    280280
    281     #if 0
    282281    // Copy any headers
    283282    pmHDU *targetHDU = pmHDUFromCell(target); // The target HDU
    284     if (targetHDU && !targetHDU->header) {
     283    if (targetHDU) {
     284        if (!targetHDU->header) {
     285            targetHDU->header = psMetadataAlloc();
     286        }
    285287        pmHDU *sourceHDU = pmHDUFromCell(source); // The source HDU
    286288        if (sourceHDU->header) {
     
    291293    // Copy the PHU over as well, if required
    292294    pmHDU *targetPHU = findBlankPHU(target); // The target PHU
    293     if (targetPHU && targetPHU != targetHDU && !targetPHU->header) {
     295    if (targetPHU && targetPHU != targetHDU) {
     296        if (!targetPHU->header) {
     297            targetPHU->header = psMetadataAlloc();
     298        }
    294299        //        pmHDU *sourcePHU = pmHDUGetHighest(source->parent->parent, source->parent, source); // A source HDU
    295300        pmHDU *sourcePHU = findBlankPHU(source); // The target PHU
     
    298303        }
    299304    }
    300     #endif
    301305
    302306    target->data_exists = true;
Note: See TracChangeset for help on using the changeset viewer.