]> Creatis software - gdcm.git/commitdiff
* gdcmPython/__init__.py fix of GDCM_DICT_PATH which was not
authorfrog <frog>
Wed, 12 Mar 2003 23:38:58 +0000 (23:38 +0000)
committerfrog <frog>
Wed, 12 Mar 2003 23:38:58 +0000 (23:38 +0000)
        to exported to the environement (see gdcmPython/testSuite.py
        for usage).
      * src/gdcmElValSet.cxx, src/gdcmUtil.[cxx-h] Tokenize utility function
        moved away from gdcmElValSet.cxx to gdcmUtil.cxx.

gdcmPython/__init__.py
src/gdcmElValSet.cxx
src/gdcmUtil.cxx
src/gdcmUtil.h

index 34ce06f7522ea717c194369e76944213e7dc525a..d15ab74da3930478c057586a2848131171b6798d 100644 (file)
@@ -43,11 +43,11 @@ except KeyError:
 #   installation scheme and the pre-install mode (see above).
 InstallModePath = os.path.join(__path__[0], "Data")
 if os.path.isfile(os.path.join(InstallModePath, "test.acr")):
-   os.environ["GDCM_DATA_PATH"] = InstallModePath
+   GDCM_DATA_PATH = InstallModePath
 else:
    PreInstallModePath = os.path.join(__path__[0], "..", "Data")
    if os.path.isfile(os.path.join(PreInstallModePath, "test.acr")):
-      os.environ["GDCM_DATA_PATH"] = PreInstallModePath
+      GDCM_DATA_PATH = PreInstallModePath
    else:
       print "Unfound data path"
       sys.exit(1)
index 6c140ae11eac05b9ac122a172d0497d1ee198bbb..b71d2784ac265a6f705ec62101f07d7b2ea5dd77 100644 (file)
@@ -1,13 +1,8 @@
-// $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.cxx,v 1.17 2003/03/12 21:33:20 frog Exp $
+// $Id: gdcmElValSet.cxx,v 1.18 2003/03/12 23:38:58 frog Exp $
 
 #include "gdcmUtil.h"
 #include "gdcmElValSet.h"
 
-
-#include <vector>
-static void Tokenize (const string& str, vector<string>& tokens, const string& delimiters = " ");
-
-
 TagElValueHT & gdcmElValSet::GetTagHt(void) {
        return tagHt;
 }
@@ -457,19 +452,3 @@ int gdcmElValSet::WriteAcr(FILE * _fp) {
                
        return(1);
 }
-
-
-
-
-// mettre ça dans une bibliothèque d'utilitaires ?
-// ca peut servir
-
-static void Tokenize (const string& str, vector<string>& tokens, const string& delimiters = " ") {
-       string::size_type lastPos = str.find_first_not_of(delimiters,0);
-       string::size_type pos     = str.find_first_of(delimiters,lastPos);
-       while (string::npos != pos || string::npos != lastPos) {
-               tokens.push_back(str.substr(lastPos, pos - lastPos));
-               lastPos = str.find_first_not_of(delimiters, pos);
-               pos = str.find_first_of(delimiters, lastPos);
-       }
-}
index 840d6f242cc186ad91b7b77c12268a55bc4fcd5e..ea90d950231603531bb53703f7c677c8a98f6acc 100644 (file)
@@ -45,7 +45,7 @@ void gdcmDebug::Exit(int a) {
 
 gdcmDebug dbg;
 
-// Because is not yet available in g++2.06
+// Because is not yet available in g++2.96
 istream& eatwhite(istream& is) {
        char c;
        while (is.get(c)) {
@@ -57,3 +57,14 @@ istream& eatwhite(istream& is) {
        return is;
 }
 
+void Tokenize (const string& str,
+               vector<string>& tokens,
+               const string& delimiters = " ") {
+   string::size_type lastPos = str.find_first_not_of(delimiters,0);
+   string::size_type pos     = str.find_first_of(delimiters,lastPos);
+   while (string::npos != pos || string::npos != lastPos) {
+      tokens.push_back(str.substr(lastPos, pos - lastPos));
+      lastPos = str.find_first_not_of(delimiters, pos);
+      pos = str.find_first_of(delimiters, lastPos);
+   }
+}
index 32f68172b2576a8fb58f541a8e969ea7fef2420e..3432bf933ae2ecfd2f3fa33e50ccde5bef15db19 100644 (file)
@@ -1,6 +1,8 @@
 // gdcmUtil.h
 
 #include <iostream>
+#include <vector>
+#include <string>
 using namespace std;
 
 class gdcmDebug {
@@ -17,4 +19,8 @@ public:
 
 istream & eatwhite(istream & is);
 
+void Tokenize (const string& str,
+               vector<string>& tokens,
+               const string& delimiters = " ");
+
 extern gdcmDebug dbg;