- * \brief Create a DictEntry which will be referenced
- * in no dictionary
- * @return virtual entry
- */
-DictEntry *DictSet::NewVirtualDictEntry( uint16_t group,
- uint16_t element,
- TagName vr,
- TagName vm,
- TagName name)
-{
- DictEntry *entry;
- const std::string tag = DictEntry::TranslateToKey(group,element)
- + "#" + vr + "#" + vm + "#" + name;
- TagKeyHT::iterator it;
-
- it = VirtualEntry.find(tag);
- if(it != VirtualEntry.end())
- {
- entry = &(it->second);
- }
- else
- {
- DictEntry ent(group, element, vr, vm, name);
- VirtualEntry.insert(
- std::map<TagKey, DictEntry>::value_type
- (tag, ent));
- entry = &(VirtualEntry.find(tag)->second);
- }
-
- 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