]> Creatis software - gdcm.git/commitdiff
Should avoid some warning from Borland Compiler
authorjpr <jpr>
Wed, 20 Apr 2005 11:25:35 +0000 (11:25 +0000)
committerjpr <jpr>
Wed, 20 Apr 2005 11:25:35 +0000 (11:25 +0000)
Example/WriteDicomSimple.cxx
Example/exGC.cxx

index 03ae9b3c65866c0413a32333e998c33c3560da5b..874194a04821b38c4a8110bd48a58a91d8d7d03a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: WriteDicomSimple.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 10:06:32 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2005/04/20 11:25:35 $
+  Version:   $Revision: 1.12 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
    header->InsertValEntry(str.str(),0x0028,0x0101); // Bits Stored
 
    str.str("");
-   str << COMPONENT_SIZE * 8 - 1;
+   str << ( COMPONENT_SIZE * 8 ) - 1;
    header->InsertValEntry(str.str(),0x0028,0x0102); // High Bit
 
    // Set the pixel representation
@@ -117,7 +117,7 @@ int main(int argc, char *argv[])
       {
          for(int c=0;c<COMPONENT;c++)
          {
-            *tmp = j;
+            *tmp = (unsigned char)j;
             tmp += COMPONENT_SIZE; 
          }
       }
index 56ec83cc7f87458dff2f7e38d4b321389f698c19..fc108a45905a81a7d2bdcf0f0a9a6e587f874987 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: exGC.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/09 15:31:15 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2005/04/20 11:25:35 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -158,9 +158,9 @@ int main(int argc, char *argv[])
            ((rgb8_t *)imageData)[i].r == ((rgb8_t *)imageData)[i].b )
       {
          n++;
-         ((rgb8_t *)imageData)[i].r = background;
-         ((rgb8_t *)imageData)[i].g = background;
-         ((rgb8_t *)imageData)[i].b = background;
+         ((rgb8_t *)imageData)[i].r = (unsigned char)background;
+         ((rgb8_t *)imageData)[i].g = (unsigned char)background;
+         ((rgb8_t *)imageData)[i].b = (unsigned char)background;
       }
    }
    
@@ -177,9 +177,9 @@ int main(int argc, char *argv[])
         ((rgb8_t *)imageData)[i].b < threshold )
       {
          n++;
-        ((rgb8_t *)imageData)[i].r = background;
-        ((rgb8_t *)imageData)[i].g = background;
-        ((rgb8_t *)imageData)[i].b = background;  
+        ((rgb8_t *)imageData)[i].r = (unsigned char)background;
+        ((rgb8_t *)imageData)[i].g = (unsigned char)background;
+        ((rgb8_t *)imageData)[i].b = (unsigned char)background;  
       }
    }