IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 25, 2012, 11:45:32 AM (14 years ago)
Author:
eugene
Message:

adding dvomerge history code to dvomerge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120805/Ohana/src/dvomerge/src/dvomergeImageIDs.c

    r33963 r34356  
    2121    return TRUE;
    2222  }
     23  // this operation reads the PHU header (inDB.header)
    2324  if (!dvo_image_load (&inDB, VERBOSE, TRUE)) {
    2425    Shutdown ("can't read input image catalog %s", inDB.filename);
    2526  }
     27
     28  // read the header for the database ID?
     29  char *indbID = dvomergeHistoryReadID (&inDB);
     30  if (!indbID) {
     31    Shutdown ("this database is missing a DVO database ID; please generate one before merging\n");
     32  }
    2633
    2734  /*** load output/Images.dat ***/
     
    4148  }
    4249
     50  dmhImage *history = dmhImageRead (&outDB);
     51  if (!history) {
     52    Shutdown ("error reading history for output database\n");
     53  }
     54
    4355  // convert database table to internal structure & add to output image db
    4456  dvo_image_merge_dbs(IDmap, &outDB, &inDB);
    4557  dvo_image_unlock (&inDB); // unlock input
     58
     59  // add the new image db to merge history
     60  // (updates header as well as history structure
     61  if (!dmhImageAdd (&outDB, history, indbID)) {
     62    Shutdown ("error reading history for output database\n");
     63  }
     64
     65  // XXX I need to pass the history structure back out somehow...
    4666
    4767  SetProtect (TRUE);
Note: See TracChangeset for help on using the changeset viewer.