X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestWriteSimple.cxx;h=19b216bc1e901c5a116bcfcd7584bb821cda2da5;hb=ba2ea83f67d798dfa2efae2fb21d3b5858c9c95c;hp=fe79c983ddf3cf7c632ece400997683e00feb15a;hpb=55549bad693bd883a36acace3a3bbd265f95dd13;p=gdcm.git diff --git a/Testing/TestWriteSimple.cxx b/Testing/TestWriteSimple.cxx index fe79c983..19b216bc 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/07 18:43:38 $ - Version: $Revision: 1.21 $ + Date: $Date: 2005/02/10 14:23:18 $ + Version: $Revision: 1.25 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -64,13 +64,39 @@ Image Images [] = { {256, 512, 1, 1, 16, 16, 0, 'e'}, {256, 512, 1, 1, 16, 16, 0, 'i'}, - {512, 256, 10, 1, 8, 8, 0, 'a'}, - {512, 256, 10, 1, 8, 8, 0, 'e'}, - {512, 256, 10, 1, 8, 8, 0, 'i'}, - {512, 256, 10, 3, 8, 8, 0, 'a'}, - {512, 256, 10, 3, 8, 8, 0, 'e'}, - {512, 256, 10, 3, 8, 8, 0, 'i'}, - {0, 0, 1, 1, 8, 8, 0, 'i'} // to find the end + {512, 256, 10, 1, 8, 8, 0, 'a'}, + {512, 256, 10, 1, 8, 8, 0, 'e'}, + {512, 256, 10, 1, 8, 8, 0, 'i'}, + {512, 256, 10, 3, 8, 8, 0, 'a'}, + {512, 256, 10, 3, 8, 8, 0, 'e'}, + {512, 256, 10, 3, 8, 8, 0, 'i'}, + + {256, 256, 1, 1, 8, 8, 1, 'a'}, + {256, 256, 1, 1, 8, 8, 1, 'e'}, + {256, 256, 1, 1, 8, 8, 1, 'i'}, + + {512, 256, 1, 1, 8, 8, 1, 'a'}, + {512, 256, 1, 1, 8, 8, 1, 'e'}, + {512, 256, 1, 1, 8, 8, 1, 'i'}, + + {256, 512, 1, 1, 8, 8, 1, 'a'}, + {256, 512, 1, 1, 8, 8, 1, 'e'}, + {256, 512, 1, 1, 8, 8, 1, 'i'}, + + {256, 512, 1, 1, 16, 16, 1, 'a'}, + {256, 512, 1, 1, 16, 16, 1, 'e'}, + {256, 512, 1, 1, 16, 16, 1, 'i'}, + {256, 512, 1, 1, 16, 16, 1, 'a'}, + {256, 512, 1, 1, 16, 16, 1, 'e'}, + {256, 512, 1, 1, 16, 16, 1, 'i'}, + + {512, 256, 10, 1, 8, 8, 1, 'a'}, + {512, 256, 10, 1, 8, 8, 1, 'e'}, + {512, 256, 10, 1, 8, 8, 1, 'i'}, + {512, 256, 10, 3, 8, 8, 1, 'a'}, + {512, 256, 10, 3, 8, 8, 1, 'e'}, + {512, 256, 10, 3, 8, 8, 1, 'i'}, + {0, 0, 1, 1, 8, 8, 0, 'i'} // to find the end }; int WriteSimple(Image &img) @@ -103,18 +129,6 @@ 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 @@ -152,7 +166,7 @@ int WriteSimple(Image &img) * img.components * img.componentSize / 8; unsigned char *imageData = new unsigned char[size]; - // FIXME : find a best heuristic to create the image + // FIXME : find a better heuristic to create the image unsigned char *tmp = imageData; for(int k=0;k