Ignore:
Timestamp:
Aug 11, 2006, 10:42:10 AM (19 years ago)
Author:
ansari
Message:

Ajout FitsInOutFile::SkipEmptyFirstHDU() , positionnement sur HDU 2 si HDU 1 vide ds operateur >> lisant des tables + autres petites corrections , Reza 11/08/2006

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaExt/FitsIOServer/fitsinoutfile.cc

    r2937 r3047  
    322322    return MoveRelToHDU(1);
    323323  else return -1;
     324}
     325
     326/*-- Methode --*/
     327/*!
     328  Skip HDU 1 if NAXIS=0 (no data), on a file opened for reading.
     329  return true if moved to HDU No 2
     330*/
     331bool FitsInOutFile::SkipEmptyFirstHDU()
     332{
     333  if (fptr_ == NULL) return false;
     334  if (mode_ == Fits_Create) return false;
     335  if (CurrentHDU() != 1) return false;
     336  int naxis = 2;
     337  long naxes[2];
     338  GetImageHDUInfo(naxis, naxes);
     339  if ((naxis == 0) &&  (NbHDUs() > 1)) {
     340    MoveRelToHDU(1);
     341    return true;
     342  }
     343  return false;
    324344}
    325345
Note: See TracChangeset for help on using the changeset viewer.