]> Creatis software - gdcm.git/blobdiff - src/gdcmPixelReadConvert.cxx
* remove compilation warnings
[gdcm.git] / src / gdcmPixelReadConvert.cxx
index a909e8d31d3ba0006933bf27c6a744426266eed5..d3dfec5b671e7b81d405601c1fdff1fb8490829a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmPixelReadConvert.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/16 10:19:19 $
-  Version:   $Revision: 1.51 $
+  Date:      $Date: 2005/02/23 09:54:59 $
+  Version:   $Revision: 1.53 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -644,8 +644,6 @@ void PixelReadConvert::ConvertReorderEndianity()
    }
 }
 
-
-
 /**
  * \brief Deal with Grey levels i.e. re-arange them
  *        to have low values = dark, high values = bright
@@ -655,7 +653,8 @@ void PixelReadConvert::ConvertFixGreyLevels()
    if (!IsMonochrome1)
       return;
 
-   int i; // to please M$VC6
+   uint32_t i; // to please M$VC6
+   int16_t j;
 
    if (!PixelSign)
    {
@@ -673,8 +672,7 @@ void PixelReadConvert::ConvertFixGreyLevels()
       if ( BitsAllocated == 16 )
       {
          uint16_t mask =1;
-         int bitStored = 12;   
-         for (i=0; i<BitsStored-1; i++)
+         for (j=0; j<BitsStored-1; j++)
          {
             mask = (mask << 1) +1; // will be fff when BitsStored=12
          }
@@ -692,8 +690,8 @@ void PixelReadConvert::ConvertFixGreyLevels()
    {
       if ( BitsAllocated == 8 )
       {
-         int8_t smask8 = 255;
-         int8_t *deb = (int8_t *)Raw;
+         uint8_t smask8 = 255;
+         uint8_t *deb = (uint8_t *)Raw;
          for (i=0; i<RawSize; i++)      
          {
             *deb = smask8 - *deb;
@@ -703,8 +701,8 @@ void PixelReadConvert::ConvertFixGreyLevels()
       }
       if ( BitsAllocated == 16 )
       {
-         int16_t smask16 = 65535;
-         int16_t *deb = (int16_t *)Raw;
+         uint16_t smask16 = 65535;
+         uint16_t *deb = (uint16_t *)Raw;
          for (i=0; i<RawSize/2; i++)      
          {
             *deb = smask16 - *deb;