]> Creatis software - gdcm.git/commitdiff
COMP: no ios_base in gcc2.95
authormalaterre <malaterre>
Tue, 30 Nov 2004 16:59:32 +0000 (16:59 +0000)
committermalaterre <malaterre>
Tue, 30 Nov 2004 16:59:32 +0000 (16:59 +0000)
src/gdcmDocument.cxx
src/gdcmPixelConvert.cxx

index 92ee5d3c76bc438716d4692399421c788b36380f..e561603b8384e10910d82ac1dbbc06568944339c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/11/30 16:24:31 $
-  Version:   $Revision: 1.143 $
+  Date:      $Date: 2004/11/30 16:59:32 $
+  Version:   $Revision: 1.144 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -101,19 +101,19 @@ Document::Document( std::string const & filename ) : ElementSet(-1)
 
    dbg.Verbose(0, "Document::Document: starting parsing of file: ",
                   Filename.c_str());
-   Fp->seekg( 0,  std::ios_base::beg);
+   Fp->seekg( 0,  std::ios::beg);
    
-   Fp->seekg(0,  std::ios_base::end);
+   Fp->seekg(0,  std::ios::end);
    long lgt = Fp->tellg();
            
-   Fp->seekg( 0,  std::ios_base::beg);
+   Fp->seekg( 0,  std::ios::beg);
    CheckSwap();
    long beg = Fp->tellg();
    lgt -= beg;
    
    ParseDES( this, beg, lgt, false); // le Load sera fait a la volee
 
-   Fp->seekg( 0,  std::ios_base::beg);
+   Fp->seekg( 0,  std::ios::beg);
    
    // Load 'non string' values
       
@@ -443,7 +443,7 @@ std::ifstream* Document::OpenFile()
    }
  
    //DICOM
-   Fp->seekg(126L, std::ios_base::cur);
+   Fp->seekg(126L, std::ios::cur);
    char dicm[4];
    Fp->read(dicm,  (size_t)4);
    if( memcmp(dicm, "DICM", 4) == 0 )
@@ -1073,7 +1073,7 @@ void Document::LoadEntryBinArea(BinEntry* element)
       OpenFile();
 
    size_t o =(size_t)element->GetOffset();
-   Fp->seekg(o, std::ios_base::beg);
+   Fp->seekg(o, std::ios::beg);
 
    size_t l = element->GetLength();
    uint8_t* a = new uint8_t[l];
@@ -1243,7 +1243,7 @@ void Document::LoadDocEntrySafe(DocEntry * entry)
    {
       long PositionOnEntry = Fp->tellg();
       LoadDocEntry(entry);
-      Fp->seekg(PositionOnEntry, std::ios_base::beg);
+      Fp->seekg(PositionOnEntry, std::ios::beg);
    }
 }
 
@@ -1423,16 +1423,16 @@ void Document::ParseDES(DocEntrySet *set, long offset,
              if ( ts == RLELossless ) 
              {
                 long PositionOnEntry = Fp->tellg();
-                Fp->seekg( newDocEntry->GetOffset(), std::ios_base::beg );
+                Fp->seekg( newDocEntry->GetOffset(), std::ios::beg );
                 ComputeRLEInfo();
-                Fp->seekg( PositionOnEntry, std::ios_base::beg );
+                Fp->seekg( PositionOnEntry, std::ios::beg );
              }
              else if ( IsJPEG() )
              {
                 long PositionOnEntry = Fp->tellg();
-                Fp->seekg( newDocEntry->GetOffset(), std::ios_base::beg );
+                Fp->seekg( newDocEntry->GetOffset(), std::ios::beg );
                 ComputeJPEGFragmentInfo();
-                Fp->seekg( PositionOnEntry, std::ios_base::beg );
+                Fp->seekg( PositionOnEntry, std::ios::beg );
              }
          }
     
@@ -1571,7 +1571,7 @@ void Document::LoadDocEntry(DocEntry* entry)
    std::string  vr = entry->GetVR();
    uint32_t length = entry->GetLength();
 
-   Fp->seekg((long)entry->GetOffset(), std::ios_base::beg);
+   Fp->seekg((long)entry->GetOffset(), std::ios::beg);
 
    // A SeQuence "contains" a set of Elements.  
    //          (fffe e000) tells us an Element is beginning
@@ -1625,7 +1625,7 @@ void Document::LoadDocEntry(DocEntry* entry)
 
       // to be sure we are at the end of the value ...
       Fp->seekg((long)entry->GetOffset()+(long)entry->GetLength(),
-                std::ios_base::beg);
+                std::ios::beg);
       return;
    }
 
@@ -1753,7 +1753,7 @@ void Document::FindDocEntryLength( DocEntry *entry )
          // The following reserved two bytes (see PS 3.5-2003, section
          // "7.1.2 Data element structure with explicit vr", p 27) must be
          // skipped before proceeding on reading the length on 4 bytes.
-         Fp->seekg( 2L, std::ios_base::cur);
+         Fp->seekg( 2L, std::ios::cur);
          uint32_t length32 = ReadInt32();
 
          if ( (vr == "OB" || vr == "OW") && length32 == 0xffffffff ) 
@@ -1773,9 +1773,9 @@ void Document::FindDocEntryLength( DocEntry *entry )
                // until the end of the file. Hence we artificially fix the
                // the length and proceed.
                long currentPosition = Fp->tellg();
-               Fp->seekg(0L,std::ios_base::end);
+               Fp->seekg(0L,std::ios::end);
                long lengthUntilEOF = (long)(Fp->tellg())-currentPosition;
-               Fp->seekg(currentPosition, std::ios_base::beg);
+               Fp->seekg(currentPosition, std::ios::beg);
                entry->SetLength(lengthUntilEOF);
                return;
             }
@@ -1893,7 +1893,7 @@ void Document::FindDocEntryVR( DocEntry *entry )
 
    if( !CheckDocEntryVR(entry, vr) )
    {
-      Fp->seekg(positionOnEntry, std::ios_base::beg);
+      Fp->seekg(positionOnEntry, std::ios::beg);
       // When this element is known in the dictionary we shall use, e.g. for
       // the semantics (see the usage of IsAnInteger), the VR proposed by the
       // dictionary entry. Still we have to flag the element as implicit since
@@ -2138,8 +2138,8 @@ void Document::SkipDocEntry(DocEntry *entry)
  */
 void Document::SkipToNextDocEntry(DocEntry *entry) 
 {
-   Fp->seekg((long)(entry->GetOffset()),     std::ios_base::beg);
-   Fp->seekg( (long)(entry->GetReadLength()), std::ios_base::cur);
+   Fp->seekg((long)(entry->GetOffset()),     std::ios::beg);
+   Fp->seekg( (long)(entry->GetReadLength()), std::ios::cur);
 }
 
 /**
@@ -2307,7 +2307,7 @@ uint32_t Document::FindDocEntryLengthOB()
       {
          dbg.Verbose(1, "Document::FindDocEntryLengthOB: neither an Item "
                         "tag nor a Sequence delimiter tag."); 
-         Fp->seekg(positionOnEntry, std::ios_base::beg);
+         Fp->seekg(positionOnEntry, std::ios::beg);
          throw FormatUnexpected("Document::FindDocEntryLengthOB()",
                                 "Neither an Item tag nor a Sequence "
                                 "delimiter tag.");
@@ -2328,7 +2328,7 @@ uint32_t Document::FindDocEntryLengthOB()
          break;
       }
    }
-   Fp->seekg( positionOnEntry, std::ios_base::beg);
+   Fp->seekg( positionOnEntry, std::ios::beg);
    return totalLength;
 }
 
@@ -2384,7 +2384,7 @@ uint32_t Document::ReadInt32()
 void Document::SkipBytes(uint32_t nBytes)
 {
    //FIXME don't dump the returned value
-   Fp->seekg((long)nBytes, std::ios_base::cur);
+   Fp->seekg((long)nBytes, std::ios::cur);
 }
 
 /**
@@ -2498,8 +2498,8 @@ bool Document::CheckSwap()
       
       // Position the file position indicator at first tag (i.e.
       // after the file preamble and the "DICM" string).
-      Fp->seekg(0, std::ios_base::beg);
-      Fp->seekg ( 132L, std::ios_base::beg);
+      Fp->seekg(0, std::ios::beg);
+      Fp->seekg ( 132L, std::ios::beg);
       return true;
    } // End of DicomV3
 
@@ -2507,7 +2507,7 @@ bool Document::CheckSwap()
    // preamble. We can reset the file position indicator to where the data
    // is (i.e. the beginning of the file).
    dbg.Verbose(1, "Document::CheckSwap:", "not a DICOM Version3 file");
-   Fp->seekg(0, std::ios_base::beg);
+   Fp->seekg(0, std::ios::beg);
 
    // Our next best chance would be to be considering a 'clean' ACR/NEMA file.
    // By clean we mean that the length of the first tag is written down.
@@ -2802,7 +2802,7 @@ bool Document::ReadTag(uint16_t testGroup, uint16_t testElement)
       s << "  at address: " << (unsigned)currentPosition << std::endl;
       dbg.Verbose(0, "Document::ReadItemTagLength: wrong Item Tag found:");
       dbg.Verbose(0, s.str().c_str());
-      Fp->seekg(positionOnEntry, std::ios_base::beg);
+      Fp->seekg(positionOnEntry, std::ios::beg);
 
       return false;
    }
index d3d6b7aa980d70c5d77f1e980cacd173415f7171..28653c12135dbbc442b1d0aa28b04d5115edc189 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmPixelConvert.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/11/25 10:24:34 $
-  Version:   $Revision: 1.33 $
+  Date:      $Date: 2004/11/30 16:59:32 $
+  Version:   $Revision: 1.34 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -273,7 +273,7 @@ bool PixelConvert::ReadAndDecompressRLEFile( std::ifstream* fp )
       // Loop on the fragments
       for( unsigned int k = 1; k <= (*it)->NumberFragments; k++ )
       {
-         fp->seekg(  (*it)->Offset[k] , std::ios_base::beg );
+         fp->seekg(  (*it)->Offset[k] , std::ios::beg );
          (void)ReadAndDecompressRLEFragment( subDecompressed,
                                              (*it)->Length[k],
                                              decompressedSegmentSize, 
@@ -413,7 +413,7 @@ bool PixelConvert::ReadAndDecompressJPEGFile( std::ifstream* fp )
         it != JPEGInfo->Fragments.end();
       ++it )
    {
-      fp->seekg( (*it)->Offset, std::ios_base::beg);
+      fp->seekg( (*it)->Offset, std::ios::beg);
 
       if ( IsJPEG2000 )
       {
@@ -601,7 +601,7 @@ bool PixelConvert::ReadAndDecompressPixelData( std::ifstream* fp )
       return false;
    }
 
-   fp->seekg( PixelOffset, std::ios_base::beg );
+   fp->seekg( PixelOffset, std::ios::beg );
    if( fp->fail() || fp->eof()) //Fp->gcount() == 1
    {
       dbg.Verbose( 0, "PixelConvert::ReadAndDecompressPixelData: "
@@ -869,7 +869,7 @@ void PixelConvert::GrabInformationsFromHeader( Header* header )
          DocEntry* lutRedDataEntry = header->GetDocEntryByNumber( 0x0028,
                                                                   0x1201 );
          LutRedData = new uint8_t[ lutRedDataEntry->GetLength() ];
-         fp->seekg(  lutRedDataEntry->GetOffset() ,std::ios_base::beg );
+         fp->seekg(  lutRedDataEntry->GetOffset() ,std::ios::beg );
          fp->read( (char*)LutRedData, (size_t)lutRedDataEntry->GetLength());
          if ( fp->fail() || fp->eof())//Fp->gcount() == 1
          {
@@ -886,7 +886,7 @@ void PixelConvert::GrabInformationsFromHeader( Header* header )
          DocEntry* lutGreenDataEntry = header->GetDocEntryByNumber( 0x0028,
                                                                     0x1202 );
          LutGreenData = new uint8_t[ lutGreenDataEntry->GetLength() ];
-         fp->seekg( lutGreenDataEntry->GetOffset() , std::ios_base::beg );
+         fp->seekg( lutGreenDataEntry->GetOffset() , std::ios::beg );
          fp->read( (char*)LutGreenData, (size_t)lutGreenDataEntry->GetLength() );
          if ( fp->fail() || fp->eof())//Fp->gcount() == 1
          {
@@ -903,7 +903,7 @@ void PixelConvert::GrabInformationsFromHeader( Header* header )
          DocEntry* lutBlueDataEntry  = header->GetDocEntryByNumber( 0x0028,
                                                                     0x1203 );
          LutBlueData = new uint8_t[ lutBlueDataEntry->GetLength() ];
-         fp->seekg(  lutBlueDataEntry->GetOffset() , std::ios_base::beg );
+         fp->seekg(  lutBlueDataEntry->GetOffset() , std::ios::beg );
          fp->read( (char*)LutBlueData, (size_t)lutBlueDataEntry->GetLength() );
          if ( fp->fail() || fp->eof())//Fp->gcount() == 1
          {