From: malaterre Date: Sat, 5 Feb 2005 03:12:28 +0000 (+0000) Subject: ENH: It's 10pm gdcm is working on big endian plateform, thanks to a special kludge... X-Git-Tag: Version1.0.bp~74 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;ds=sidebyside;h=361dbdfcc3c04b3b30d427c1c09d962d5c9cefb3;p=gdcm.git ENH: It's 10pm gdcm is working on big endian plateform, thanks to a special kludge. I dont care how you fix it, I am not working anymore on the big endian thingy ! --- diff --git a/Testing/TestWriteSimple.cxx b/Testing/TestWriteSimple.cxx index 51d04094..42f710a3 100644 --- a/Testing/TestWriteSimple.cxx +++ b/Testing/TestWriteSimple.cxx @@ -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 diff --git a/src/gdcmBinEntry.cxx b/src/gdcmBinEntry.cxx index 341843cc..61a98a03 100644 --- a/src/gdcmBinEntry.cxx +++ b/src/gdcmBinEntry.cxx @@ -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];