IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 12, 2015, 6:18:23 PM (11 years ago)
Author:
eugene
Message:

merge changes from EAM dev branch ohana.20150429

Location:
trunk/Ohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana

  • trunk/Ohana/src/libdvo/src/dvo_image.c

    r37807 r38441  
    1919  db[0].lockstate = lockstate;
    2020  db[0].timeout   = timeout;
    21   gfits_db_init (db);
    2221
    2322  if (!gfits_db_lock (db, filename)) {
     
    8988  // so when we later do a gfits_copy_ftable, we stomp on bad memory
    9089  FtableToImage (&db[0].ftable, &db[0].theader, &db[0].format);
    91   db[0].swapped = TRUE;  /* table has internal byte-order */
     90  db[0].nativeOrder = TRUE;  /* table has internal byte-order */
     91  db[0].scaledValue = TRUE;  /* table has internal byte-order */
    9292  return (TRUE);
    9393}
     
    100100  /* convert from internal to requested external format */
    101101  ImageToFtable (&db[0].ftable, &db[0].theader, db[0].format);
    102   db[0].swapped = FALSE;
     102  db[0].nativeOrder = FALSE;
     103  db[0].scaledValue = FALSE;
    103104
    104105  /* write data in appropriate mode */
     
    149150  /* theader is modified to match output format */
    150151  ImageToVtable (&db[0].vtable, &db[0].theader, db[0].format);
    151   db[0].swapped = FALSE;
     152  db[0].scaledValue = FALSE;
     153  db[0].nativeOrder = FALSE;
    152154
    153155  /* write data in appropriate mode */
     
    363365
    364366/* return internal structure representation */
    365 Image *gfits_table_get_Image (FTable *ftable, off_t *Ndata, char *swapped) {
     367Image *gfits_table_get_Image (FTable *ftable, off_t *Ndata, char *scaledValue, char *nativeOrder) {
    366368
    367369  int Ncols;
     
    377379  data = (Image *) ftable[0].buffer;
    378380
    379   if (!swapped) {
    380     myAbort ("invalid to call this without suppying 'swapped'");
    381   }
    382   if (*swapped == FALSE) {
    383     myAbort ("invalid for table to be swapped");
     381  if (!scaledValue) {
     382    myAbort ("invalid to call this without suppying 'scaledValue'");
     383  }
     384  if (*scaledValue == FALSE) {
     385    myAbort ("invalid for table NOT to be scaledValue");
     386  }
     387  if (!nativeOrder) {
     388    myAbort ("invalid to call this without suppying 'nativeOrder'");
     389  }
     390  if (*nativeOrder == FALSE) {
     391    myAbort ("invalid for table NOT to be nativeOrder");
    384392  }
    385393   
Note: See TracChangeset for help on using the changeset viewer.