]> Creatis software - gdcm.git/blobdiff - src/gdcmFile.cxx
ENH: Move the old setup.py to its new home
[gdcm.git] / src / gdcmFile.cxx
index 323cdba54346ab1add3ab41eb4006c14a11459e3..2defabdaebfcadf3c4ec6046467059cda33038c6 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/10/08 17:02:53 $
-  Version:   $Revision: 1.136 $
+  Date:      $Date: 2004/10/08 17:24:54 $
+  Version:   $Revision: 1.137 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -1068,11 +1068,17 @@ bool gdcmFile::ReadPixelData(void* destination)
             // Reading Fragment pixels
             res = gdcm_read_JPEG_file (fp,destination);
          }
-         else
+         else if ( Header->GetBitsStored() == 12)
          {
             // Reading Fragment pixels
             res = gdcm_read_JPEG_file12 (fp,destination);
          }
+         else
+         {
+            // other JPEG lossy not supported
+            dbg.Error(" gdcmFile::ReadPixelData : unknown jpeg lossy compression");
+            return 0;
+         }
          // ------------------------------------- endif (JPEGLossy)
       }