]> Creatis software - gdcm.git/blobdiff - src/gdcmPixelReadConvert.cxx
Jpeg writter is no longer confused by DataElements 7fe0|0010 inside a Sequence
[gdcm.git] / src / gdcmPixelReadConvert.cxx
index 858894d6c828782af1c9b34fa65f805c72130afd..ee0eb6cff9a46c2b42bd60fedb78dff3bb8315ed 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmPixelReadConvert.cxx,v $
   Language:  C++
-  Date:      $Date: 2006/08/30 13:31:05 $
-  Version:   $Revision: 1.114 $
+  Date:      $Date: 2007/08/29 08:10:14 $
+  Version:   $Revision: 1.117 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -32,7 +32,7 @@
    #include <mem.h> // for memset
 #endif 
 
-namespace gdcm
+namespace GDCM_NAME_SPACE
 {
 
 //bool ReadMPEGFile (std::ifstream *fp, char *inputdata, size_t lenght); 
@@ -594,7 +594,7 @@ bool PixelReadConvert::ReadAndDecompressJPEGFile( std::ifstream *fp )
      // Precompute the offset localRaw will be shifted with
      int length = XSize * YSize * ZSize * SamplesPerPixel;
      int numberBytes = BitsAllocated / 8;
-
+     
      JPEGInfo->DecompressFromFile(fp, Raw, BitsStored, numberBytes, length );
      return true;
    }
@@ -1351,7 +1351,10 @@ void PixelReadConvert::ComputeRawAndRGBSizes()
    else
    {
       RGBSize = RawSize;
+      
    }
+   RawSize += RawSize%2;
+   RGBSize += RGBSize%2;
 }
 
 /// Allocates room for RGB Pixels