]> Creatis software - gdcm.git/commitdiff
ENH: It's 10pm gdcm is working on big endian plateform, thanks to a special kludge...
authormalaterre <malaterre>
Sat, 5 Feb 2005 03:12:28 +0000 (03:12 +0000)
committermalaterre <malaterre>
Sat, 5 Feb 2005 03:12:28 +0000 (03:12 +0000)
Testing/TestWriteSimple.cxx
src/gdcmBinEntry.cxx

index 51d04094fcff7e183de784a3c79f6944f5be99c8..42f710a32e6e0b70d77a7e86ce482c1cc5df1b7f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestWriteSimple.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 10:05:26 $
-  Version:   $Revision: 1.18 $
+  Date:      $Date: 2005/02/05 03:12:28 $
+  Version:   $Revision: 1.19 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -96,6 +96,18 @@ int WriteSimple(Image &img)
    str << img.componentSize;
    fileToBuild->InsertValEntry(str.str(),0x0028,0x0100); // Bits Allocated
 
+   /******************************************/
+   /******************************************/
+   // Super duper kludge !!
+   if( img.componentSize == 16 )
+     {
+     // I guess by design user should know that...
+     fileToBuild->InsertBinEntry(0,0, 0x7fe0, 0x0010, "OW");
+     }
+   /******************************************/
+   /******************************************/
+   
+
    str.str("");
    str << img.componentUse;
    fileToBuild->InsertValEntry(str.str(),0x0028,0x0101); // Bits Stored
index 341843cc8ec34c6f600776b79a8c98c42f077337..61a98a03d8972efd16e4ea92d853c0ede75d2d50 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmBinEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/05 02:28:49 $
-  Version:   $Revision: 1.65 $
+  Date:      $Date: 2005/02/05 03:12:28 $
+  Version:   $Revision: 1.66 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -90,7 +90,7 @@ void BinEntry::WriteContent(std::ofstream *fp, FileType filetype)
 
       // 8 Bits Pixels *are* OB, 16 Bits Pixels *are* OW
       // -value forced while Reading process-
-      if (GetGroup() == 0x7fe0 ) //&& GetVR() == "OW")
+      if (GetGroup() == 0x7fe0 && GetVR() == "OW")
       {     
          uint16_t *buffer = new uint16_t[BUFFER_SIZE/2];