X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDictSet.cxx;h=8ec72b614d6ede6eefa1534915623f1493f6e9f9;hb=87d658ea3d71cf417c73a9b109ae6e7ba8b3881f;hp=02063318609651db2274c2b8e6a0a0a1285a7196;hpb=d1c68c2c2ae9fadf927053150f7fbc625a7c7366;p=gdcm.git diff --git a/src/gdcmDictSet.cxx b/src/gdcmDictSet.cxx index 02063318..8ec72b61 100644 --- a/src/gdcmDictSet.cxx +++ b/src/gdcmDictSet.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDictSet.cxx,v $ Language: C++ - Date: $Date: 2005/02/01 10:29:55 $ - Version: $Revision: 1.57 $ + Date: $Date: 2005/04/05 10:56:25 $ + Version: $Revision: 1.62 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -69,8 +69,8 @@ DictSet::~DictSet() * @param name Symbolic name that be used as identifier of the newly * created dictionary. */ -Dict *DictSet::LoadDictFromFile(std::string const & filename, - DictKey const & name) +Dict *DictSet::LoadDictFromFile(std::string const &filename, + DictKey const &name) { Dict *newDict = new Dict(filename); AppendDict(newDict, name); @@ -127,36 +127,6 @@ DictEntry *DictSet::NewVirtualDictEntry( uint16_t group, return entry; } -/** - * \brief Obtain from the GDCM_DICT_PATH environnement variable the - * path to directory containing the dictionaries. When - * the environnement variable is absent the path is defaulted - * to "../Dicts/". - * @return path to directory containing the dictionaries - */ -std::string DictSet::BuildDictPath() -{ - std::string resultPath; - const char *envPath = 0; - envPath = getenv("GDCM_DICT_PATH"); - - if (envPath && (strlen(envPath) != 0)) - { - resultPath = envPath; - if ( resultPath[resultPath.length()-1] != '/' ) - { - resultPath += '/'; - } - gdcmVerboseMacro( "Dictionary path set from environnement"); - } - else - { - resultPath = PUB_DICT_PATH; - } - - return resultPath; -} - /** * \brief Get the first entry while visiting the DictSet * \return The first Dict if found, otherwhise NULL @@ -184,6 +154,36 @@ Dict *DictSet::GetNextEntry() return NULL; } +/** + * \brief Obtain from the GDCM_DICT_PATH environnement variable the + * path to directory containing the dictionaries. When + * the environnement variable is absent the path is defaulted + * to "../Dicts/". + * @return path to directory containing the dictionaries + */ +std::string DictSet::BuildDictPath() +{ + std::string resultPath; + const char *envPath; + envPath = getenv("GDCM_DICT_PATH"); + + if (envPath && (strlen(envPath) != 0)) + { + resultPath = envPath; + gdcmWarningMacro( "Dictionary path set from environnement"); + } + else + { + resultPath = PUB_DICT_PATH; + } + if ( resultPath[resultPath.length()-1] != '/' ) + { + resultPath += '/'; + } + + return resultPath; +} + //----------------------------------------------------------------------------- // Protected /**