IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 30, 2014, 12:50:35 PM (12 years ago)
Author:
eugene
Message:

update the AstromOffsetTable size after checking for existing entries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140904/Ohana/src/libdvo/src/AstromOffsetMapUtils.c

    r37683 r37698  
    169169int AstromOffsetTableNewMap (AstromOffsetTable *table, int Nx, int Ny, Image *image) {
    170170
    171   int Nmap = table->Nmap;
    172 
    173   table->Nmap++;
    174   REALLOCATE (table->map, AstromOffsetMap *, table->Nmap);
    175 
    176171  off_t i;
    177172  if (image->imageID > table->MaxImageID) {
     
    186181  if (seq != -1) {
    187182    // already assigned (but not used)
    188     // XXX this is probably wrong : I need to mark failed maps so they are not saved.
     183    AstromOffsetMapSetOrder (table->map[seq], Nx, Ny, image);
    189184    image[0].coords.offsetMap = table->map[seq];   
    190185    return TRUE;
    191186  }
     187
     188  int Nmap = table->Nmap;
     189
     190  table->Nmap++;
     191  REALLOCATE (table->map, AstromOffsetMap *, table->Nmap);
    192192
    193193  myAssert (table->imageIDtoTableSeq[image->imageID] == -1, "table IDtoSeq not initiazed or image collision");
Note: See TracChangeset for help on using the changeset viewer.