IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8582 for trunk/psModules


Ignore:
Timestamp:
Aug 24, 2006, 4:49:40 PM (20 years ago)
Author:
Paul Price
Message:

generateTrimBias was not storing the newly created trimsec.

File:
1 edited

Legend:

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

    r7431 r8582  
    190190    psListIteratorSet(cellsIter, PS_LIST_HEAD);
    191191    while ((cell = psListGetAndIncrement(cellsIter))) {
    192         psRegion *trimsec = psMetadataLookupPtr(&mdok, cell->concepts, "CELL.TRIMSEC"); // Trim section
    193         if (!mdok || !trimsec) {
     192        psMetadataItem *trimsecItem = psMetadataLookup(cell->concepts, "CELL.TRIMSEC"); // Item with trimsec
     193        if (!trimsecItem || trimsecItem->type != PS_DATA_REGION) {
    194194            psLogMsg(__func__, PS_LOG_WARN, "CELL.TRIMSEC has not been initialised in cell --- "
    195195                     "ignored.\n");
    196196            continue;
    197197        }
     198        psRegion *trimsec = trimsecItem->data.V; // Trim section
    198199
    199200        int cellreaddir = psMetadataLookupS32(&mdok, cell->concepts, "CELL.READDIR"); // Read direction
     
    215216            continue;
    216217        }
    217         psFree(trimsec);                // Drop old reference
    218         trimsec = sectionForImage(&position, image, cellreaddir); // New reference
     218        // New reference
     219        trimsec = sectionForImage(&position, image, cellreaddir);
     220        psFree(trimsecItem->data.V);
     221        trimsecItem->data.V = trimsec;
    219222    }
    220223
Note: See TracChangeset for help on using the changeset viewer.