X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestUtil.cxx;h=d72b8c471de31f7f2cdc7d5e99568d13b05fc40f;hb=d66701140e07d8e6fa7a529a8d2ae99d685026c5;hp=26a81a4f1f779bcd366f4e23fee120e7cb77da3e;hpb=80101e358eba3cfca1b7f597c4add6137e553bf2;p=gdcm.git diff --git a/Testing/TestUtil.cxx b/Testing/TestUtil.cxx index 26a81a4f..d72b8c47 100644 --- a/Testing/TestUtil.cxx +++ b/Testing/TestUtil.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestUtil.cxx,v $ Language: C++ - Date: $Date: 2005/02/14 10:50:00 $ - Version: $Revision: 1.11 $ + Date: $Date: 2005/08/22 15:38:04 $ + Version: $Revision: 1.15 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,22 +24,87 @@ int TestUtil(int , char *[]) { + unsigned int i; + + // Seeing at a glance HOW int16, int32, float, double, + // are implanted in memory + uint16_t u16 = 0x0102; + uint32_t u32 = 0x01020304; + float flt= 1.0; + double dbl=1.0; + + std::cout << "This is gdcm version: " << gdcm::Util::GetVersion() << std::endl; + + std::cout << "---------- uint16 : " << std::dec < [" << y <<"]" << std::endl; + std::cout << "Clean : [" << x <<"] --> [" << y <<"]" << std::endl; + // CountSubstring : substring id "#@-" x = "abcd#@-wyz*@-lmn#@-uvw-#@ijk"; - std::cout << "count '#@-' in [" << x << "] : " + std::cout << "in [" << x << "] " << std::endl; + std::cout << " - count '#@-' : " << gdcm::Util::CountSubstring(x, "#@-") << std::endl; // Tokenize : tokens are '#', '@', '-' std::vector tokens; + std::cout << " - use tokens '#@-' :" << std::endl; gdcm::Util::Tokenize (x, tokens, "#@-"); - for (unsigned int i=0; i