IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 30, 2006, 10:08:30 AM (20 years ago)
Author:
Paul Price
Message:

pmFPACopy now working

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/rel10_ifa/psModules/src/astrom/pmConceptsStandard.c

    r6663 r6734  
    156156    }
    157157
    158     psMetadataItem *item = psMetadataItemAllocPtr(pattern->name, PS_DATA_UNKNOWN, pattern->comment, trimsec);
     158    psMetadataItem *item = psMetadataItemAllocPtr(pattern->name, PS_DATA_REGION, pattern->comment, trimsec);
    159159    psFree(trimsec);
    160160    return item;
     
    434434
    435435
    436 
     436#if 0
    437437psMetadataItem *pmConceptFormat_CELL_TRIMSEC(psMetadataItem *concept, psMetadata *cameraFormat, pmFPA *fpa, pmChip *chip, pmCell *cell)
    438438{
     
    446446    return formatted;
    447447}
    448 
    449 
    450 bool pmConceptFormat_CELL_BIASSEC(psMetadataItem *concept, psMetadata *cameraFormat, pmFPA *fpa, pmChip *chip, pmCell *cell)
    451 {
     448#endif
     449
     450psMetadataItem *pmConceptFormat_CELL_BIASSEC(psMetadataItem *concept, psMetadata *cameraFormat, pmFPA *fpa, pmChip *chip, pmCell *cell)
     451{
     452    // Return a metadata item containing a list of metadata items of region strings
    452453    psList *biassecs = concept->data.V; // The biassecs region list
    453     psString biassecString = NULL;      // String containing the biassecs
    454454    psListIterator *biassecsIter = psListIteratorAlloc(biassecs, PS_LIST_HEAD, false); // Iterator
    455455    psRegion *region = NULL;            // Region from iteration
    456     bool first = true;                  // Are we on the first one?
     456    psList *new = psListAlloc(NULL);    // New list containing metadatas
    457457    while ((region = psListGetAndIncrement(biassecsIter))) {
    458458        psString regionString = psRegionToString(*region); // The string region "[x0:x1,y0:y1]"
    459         if (first) {
    460             psStringAppend(&biassecString, "%s", regionString);
    461             first = false;
    462         } else {
    463             psStringAppend(&biassecString, ";%s", regionString); // Put in a semi-colon
    464         }
    465         psFree(regionString);
     459        psMetadataItem *item = psMetadataItemAllocStr(concept->name, concept->comment, regionString);
     460        psFree(regionString);           // Drop reference
     461        psListAdd(new, PS_LIST_TAIL, item);
     462        psFree(item);                   // Drop reference
    466463    }
    467464    psFree(biassecsIter);
    468     psMetadataItem *formatted = psMetadataItemAllocStr(concept->name, concept->comment, biassecString);
    469     psFree(biassecString);              // Drop reference
     465    psMetadataItem *formatted = psMetadataItemAllocPtr(concept->name, PS_DATA_LIST, concept->comment, new);
     466    psFree(new);                        // Drop reference
    470467    return formatted;
    471468}
    472 
    473469
    474470// This function actually does both CELL.XBIN and CELL.YBIN if CELL.XBIN and CELL.YBIN are specified by the
Note: See TracChangeset for help on using the changeset viewer.