#include <gdcmDictSet.h>
Public Member Functions | |
gdcmDictSet (void) | |
The Dictionnary Set obtained with this constructor simply contains the Default Public dictionnary. | |
~gdcmDictSet (void) | |
Destructor. | |
void | Print (std::ostream &os) |
Print, in an informal fashion, the list of all the dictionaries contained is this gdcmDictSet, along with their respective content. | |
std::list< std::string > * | GetPubDictEntryNames (void) |
Consider all the entries of the public dicom dictionnary. Build all list of all the tag names of all those entries. | |
std::map< std::string, std::list< std::string > > * | GetPubDictEntryNamesByCategory (void) |
| |
gdcmDict * | LoadDictFromFile (std::string FileName, DictKey Name) |
Loads a dictionary from a specified file, and add it to already the existing ones contained in this gdcmDictSet. | |
gdcmDict * | GetDict (DictKey DictName) |
Retrieve the specified dictionary (when existing) from this gdcmDictSet. | |
gdcmDict * | GetDefaultPubDict (void) |
Retrieve the default reference DICOM V3 public dictionary.
| |
gdcmDictEntry * | NewVirtualDictEntry (guint16 group, guint16 element, std::string vr="Unknown", std::string fourth="Unknown", std::string name="Unknown") |
Create a gdcmDictEntry which will be reference in no dictionnary. | |
Static Public Member Functions | |
std::string | BuildDictPath (void) |
Obtain from the GDCM_DICT_PATH environnement variable the path to directory containing the dictionnaries. When the environnement variable is absent the path is defaulted to "../Dicts/". | |
Protected Member Functions | |
bool | AppendDict (gdcmDict *NewDict, DictKey Name) |
Private Attributes | |
DictSetHT | Dicts |
Hash table of all dictionaries contained in this gdcmDictSet. | |
std::string | DictPath |
Directory path to dictionaries. | |
std::map< std::string, gdcmDictEntry * > | virtualEntry |
|
The Dictionnary Set obtained with this constructor simply contains the Default Public dictionnary.
Definition at line 21 of file gdcmDictSet.cxx. References BuildDictPath(), DictPath, Dicts, PUB_DICT_FILENAME, and PUB_DICT_NAME.
00022 { 00023 DictPath = BuildDictPath(); 00024 std::string PubDictFile = DictPath + PUB_DICT_FILENAME; 00025 Dicts[PUB_DICT_NAME] = new gdcmDict(PubDictFile); 00026 } |
|
Destructor.
Definition at line 32 of file gdcmDictSet.cxx. References Dicts, and virtualEntry.
00033 { 00034 // Remove dictionnaries 00035 for (DictSetHT::iterator tag = Dicts.begin(); tag != Dicts.end(); ++tag) 00036 { 00037 gdcmDict *EntryToDelete = tag->second; 00038 if ( EntryToDelete ) 00039 delete EntryToDelete; 00040 tag->second=NULL; 00041 } 00042 Dicts.clear(); 00043 00044 // Remove virtual dictionnary entries 00045 std::map<std::string,gdcmDictEntry *>::iterator it; 00046 for(it=virtualEntry.begin(); it!=virtualEntry.end(); ++it) 00047 { 00048 gdcmDictEntry *Entry = it->second; 00049 if ( Entry ) 00050 delete Entry; 00051 it->second=NULL; 00052 } 00053 } |
|
Definition at line 212 of file gdcmDictSet.cxx. References DictKey, and Dicts. Referenced by LoadDictFromFile().
00213 { 00214 Dicts[Name] = NewDict; 00215 return(true); 00216 } |
|
Obtain from the GDCM_DICT_PATH environnement variable the path to directory containing the dictionnaries. When the environnement variable is absent the path is defaulted to "../Dicts/".
Definition at line 192 of file gdcmDictSet.cxx. References dbg, PUB_DICT_PATH, and gdcmDebug::Verbose(). Referenced by gdcmDicomDirElement::gdcmDicomDirElement(), gdcmDictSet(), gdcmTS::gdcmTS(), and gdcmVR::gdcmVR().
00193 { 00194 std::string ResultPath; 00195 const char *EnvPath = (char*)0; 00196 EnvPath = getenv("GDCM_DICT_PATH"); 00197 if (EnvPath && (strlen(EnvPath) != 0)) 00198 { 00199 ResultPath = EnvPath; 00200 if (ResultPath[ResultPath.length() -1] != '/' ) 00201 ResultPath += '/'; 00202 dbg.Verbose(1, "gdcmDictSet::BuildDictPath:", 00203 "Dictionary path set from environnement"); 00204 } 00205 else 00206 ResultPath = PUB_DICT_PATH; 00207 return ResultPath; 00208 } |
|
Retrieve the default reference DICOM V3 public dictionary.
Definition at line 152 of file gdcmDictSet.cxx. References GetDict(), and PUB_DICT_NAME. Referenced by gdcmObject::GetEntryByName(), GetPubDictEntryNames(), GetPubDictEntryNamesByCategory(), and gdcmParser::Initialise().
00153 { 00154 return GetDict(PUB_DICT_NAME); 00155 } |
|
Retrieve the specified dictionary (when existing) from this gdcmDictSet.
Definition at line 139 of file gdcmDictSet.cxx. References DictKey, and Dicts. Referenced by GetDefaultPubDict(), and gdcmParser::SetShaDict().
|
|
Consider all the entries of the public dicom dictionnary. Build all list of all the tag names of all those entries.
Definition at line 81 of file gdcmDictSet.cxx. References GetDefaultPubDict(), and gdcmDict::GetDictEntryNames().
00082 { 00083 return(GetDefaultPubDict()->GetDictEntryNames()); 00084 } |
|
Definition at line 111 of file gdcmDictSet.cxx. References GetDefaultPubDict(), and gdcmDict::GetDictEntryNamesByCategory().
00112 { 00113 return(GetDefaultPubDict()->GetDictEntryNamesByCategory()); 00114 } |
|
Loads a dictionary from a specified file, and add it to already the existing ones contained in this gdcmDictSet.
Definition at line 125 of file gdcmDictSet.cxx. References AppendDict(), and DictKey.
00126 { 00127 gdcmDict *NewDict = new gdcmDict(FileName); 00128 AppendDict(NewDict,Name); 00129 return(NewDict); 00130 } |
|
Create a gdcmDictEntry which will be reference in no dictionnary.
Definition at line 163 of file gdcmDictSet.cxx. References gdcmDictEntry::TranslateToKey(), and virtualEntry. Referenced by gdcmParser::NewVirtualDictEntry().
00166 { 00167 gdcmDictEntry *entry; 00168 std::string tag=gdcmDictEntry::TranslateToKey(group,element)+"#"+vr+"#"+fourth+"#"+name; 00169 std::map<std::string,gdcmDictEntry *>::iterator it; 00170 00171 it=virtualEntry.find(tag); 00172 if(it!=virtualEntry.end()) 00173 { 00174 entry=it->second; 00175 } 00176 else 00177 { 00178 entry=new gdcmDictEntry(group,element,vr,fourth,name); 00179 virtualEntry[tag]=entry; 00180 } 00181 return(entry); 00182 } |
|
Print, in an informal fashion, the list of all the dictionaries contained is this gdcmDictSet, along with their respective content.
Definition at line 63 of file gdcmDictSet.cxx. References Dicts.
|
|
Directory path to dictionaries.
Definition at line 59 of file gdcmDictSet.h. Referenced by gdcmDictSet(). |
|
Hash table of all dictionaries contained in this gdcmDictSet.
Definition at line 57 of file gdcmDictSet.h. Referenced by AppendDict(), gdcmDictSet(), GetDict(), Print(), and ~gdcmDictSet(). |
|
Definition at line 61 of file gdcmDictSet.h. Referenced by NewVirtualDictEntry(), and ~gdcmDictSet(). |