]> Creatis software - gdcm.git/blobdiff - src/gdcmFile.cxx
- now, DicomDir stuff stakes into account the 'new' structure
[gdcm.git] / src / gdcmFile.cxx
index 8221bd388d21676f8b136f67a19089f411c128cf..484cc6909b771923839065f92c52f157918b63ee 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/07/16 15:18:05 $
-  Version:   $Revision: 1.116 $
+  Date:      $Date: 2004/08/26 15:29:53 $
+  Version:   $Revision: 1.121 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -22,7 +22,7 @@
 
 typedef std::pair<TagDocEntryHT::iterator,TagDocEntryHT::iterator> IterHT;
 
-//-----------------------------------------------------------------------------
+//-------------------------------------------------------------------------
 // Constructor / Destructor
 /**
  * \ingroup   gdcmFile
@@ -62,26 +62,10 @@ gdcmFile::gdcmFile(gdcmHeader *header)
  *        one sets an a posteriori shadow dictionary (efficiency can be
  *        seen as a side effect).   
  * @param filename file to be opened for parsing
- * @param   exception_on_error whether we throw an exception or not
- * @param   enable_sequences = true to allow the header 
- *          to be parsed *inside* the SeQuences, 
- *          when they have an actual length 
- * \warning enable_sequences *has to be* true for reading PAPYRUS 3.0 files
- * @param   ignore_shadow to allow skipping the shadow elements, 
- *          to save memory space.
- * \warning The TRUE value for this param has to be used 
- *          with a FALSE value for the 'enable_sequence' param.
- *          ('public elements' may be embedded in 'shadow Sequences')
  */
-gdcmFile::gdcmFile(std::string const & filename, 
-                   bool exception_on_error,
-                   bool enable_sequences, 
-                   bool ignore_shadow)
+gdcmFile::gdcmFile(std::string const & filename )
 {
-   Header = new gdcmHeader( filename,
-                            exception_on_error,
-                            enable_sequences,
-                            ignore_shadow );
+   Header = new gdcmHeader( filename );
    SelfHeader = true;
    PixelRead  = -1; // no ImageData read yet.
 
@@ -169,7 +153,7 @@ void gdcmFile::SetPixelDataSizeFromHeader()
    std::string str_PhotometricInterpretation = 
                              Header->GetEntryByNumber(0x0028,0x0004);
     
-   /*if ( str_PhotometricInterpretation == "PALETTE COLOR " )*/
+   // if ( str_PhotometricInterpretation == "PALETTE COLOR " )
    // pb when undealt Segmented Palette Color
    
    if ( Header->HasLUT() )
@@ -846,7 +830,7 @@ void gdcmFile::SwapZone(void *im, int swap, int lgr, int nb)
          case 4321:
             for(i=0; i < lgr/2; i++)
             {
-            im16[i]= (im16[i] >> 8) | (im16[i] << 8 );
+               im16[i]= (im16[i] >> 8) | (im16[i] << 8 );
             }
             break;
          default:
@@ -1055,7 +1039,7 @@ bool gdcmFile::ReadPixelData(void *destination)
       if ( jpg2000 )
       {
       // JPEG 2000 :    call to ???
-      res = (bool)gdcm_read_JPEG2000_file (fp,destination);  // Not Yet written 
+      res = gdcm_read_JPEG2000_file (fp,destination);  // Not Yet written 
       // ------------------------------------- endif (JPEG2000)
       }
       else if (jpgLossless)
@@ -1073,12 +1057,12 @@ bool gdcmFile::ReadPixelData(void *destination)
          if ( Header->GetBitsStored() == 8)
          {
             // Reading Fragment pixels
-            res = (bool)gdcm_read_JPEG_file (fp,destination);
+            res = gdcm_read_JPEG_file (fp,destination);
          }
          else
          {
             // Reading Fragment pixels
-            res = (bool)gdcm_read_JPEG_file12 (fp,destination);
+            res = gdcm_read_JPEG_file12 (fp,destination);
          }
          // ------------------------------------- endif (JPEGLossy)
       }