#include <gdcmDictSet.h>
Inheritance diagram for gdcm::DictSet:

Public Member Functions | |
| DictSet () | |
| The Dictionary Set obtained with this constructor simply contains the Default Public dictionary. | |
| ~DictSet () | |
| Destructor. | |
| void | Print (std::ostream &os=std::cout, std::string const &indent="") |
| Print, in an informal fashion, the list of all the dictionaries contained is this DictSet, along with their respective content. | |
| Dict * | LoadDictFromFile (std::string const &fileName, DictKey const &name) |
| Loads a dictionary from a specified file, and add it to already the existing ones contained in this DictSet. | |
| Dict * | GetDict (DictKey const &DictName) |
| Retrieve the specified dictionary (when existing) from this DictSet. | |
| Dict * | GetDefaultPubDict () |
| Retrieve the default reference DICOM V3 public dictionary. | |
| DictEntry * | NewVirtualDictEntry (uint16_t group, uint16_t elem, TagName vr=GDCM_UNKNOWN, TagName vm=GDCM_UNKNOWN, TagName name=GDCM_UNKNOWN) |
| Create a DictEntry which will be referenced in no dictionary. | |
| Dict * | GetFirstEntry () |
| Get the first entry while visiting the DictSet. | |
| Dict * | GetNextEntry () |
| Get the next entry while visiting the Hash table (DictSetHT). | |
| void | SetPrintLevel (int level) |
| Sets the print level for the Dicom Header Elements. | |
| int | GetPrintLevel () |
| Gets the print level for the Dicom Entries. | |
Static Public Member Functions | |
| std::string | BuildDictPath () |
| 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/". | |
Protected Member Functions | |
| bool | AppendDict (Dict *NewDict, DictKey const &name) |
| Adds a Dictionary to a DictSet. | |
Protected Attributes | |
| int | PrintLevel |
| Amount of printed details for each Dicom Entries : 0 : stands for the least detail level. | |
Private Attributes | |
| DictSetHT | Dicts |
| Hash table of all dictionaries contained in this DictSet. | |
| DictSetHT::iterator | ItDictHt |
| std::string | DictPath |
| Directory path to dictionaries. | |
| TagKeyHT | VirtualEntry |
| H table for the on the fly created DictEntries. | |
Definition at line 40 of file gdcmDictSet.h.
|
|
The Dictionary Set obtained with this constructor simply contains the Default Public dictionary.
Definition at line 33 of file gdcmDictSet.cxx. References BuildDictPath(), DictPath, Dicts, PUB_DICT_FILENAME, and PUB_DICT_NAME.
00034 {
00035 DictPath = BuildDictPath();
00036 std::string pubDictFile(DictPath);
00037 pubDictFile += PUB_DICT_FILENAME;
00038 Dicts[PUB_DICT_NAME] = new Dict(pubDictFile);
00039 }
|
|
|
Destructor.
Definition at line 44 of file gdcmDictSet.cxx. References Dicts, and VirtualEntry.
00045 {
00046 // Remove dictionaries
00047 for (DictSetHT::iterator tag = Dicts.begin(); tag != Dicts.end(); ++tag)
00048 {
00049 Dict *entryToDelete = tag->second;
00050 if ( entryToDelete )
00051 {
00052 delete entryToDelete;
00053 }
00054 tag->second = NULL;
00055 }
00056 Dicts.clear();
00057
00058 // Remove virtual dictionary entries
00059 VirtualEntry.clear();
00060 }
|
|
||||||||||||
|
Adds a Dictionary to a DictSet.
Definition at line 193 of file gdcmDictSet.cxx. References gdcm::DictKey, and Dicts. Referenced by LoadDictFromFile().
00194 {
00195 Dicts[name] = newDict;
00196
00197 return true;
00198 }
|
|
|
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/".
Definition at line 164 of file gdcmDictSet.cxx. References gdcmWarningMacro, and PUB_DICT_PATH. Referenced by DictSet().
00165 {
00166 std::string resultPath;
00167 const char *envPath = 0;
00168 envPath = getenv("GDCM_DICT_PATH");
00169
00170 if (envPath && (strlen(envPath) != 0))
00171 {
00172 resultPath = envPath;
00173 if ( resultPath[resultPath.length()-1] != '/' )
00174 {
00175 resultPath += '/';
00176 }
00177 gdcmWarningMacro( "Dictionary path set from environnement");
00178 }
00179 else
00180 {
00181 resultPath = PUB_DICT_PATH;
00182 }
00183
00184 return resultPath;
00185 }
|
|
|
Retrieve the default reference DICOM V3 public dictionary.
Definition at line 58 of file gdcmDictSet.h. References PUB_DICT_NAME.
00058 { return GetDict(PUB_DICT_NAME); };
|
|
|
Retrieve the specified dictionary (when existing) from this DictSet.
Definition at line 87 of file gdcmDictSet.cxx. References gdcm::DictKey, and Dicts.
|
|
|
Get the first entry while visiting the DictSet.
Definition at line 134 of file gdcmDictSet.cxx. References Dicts, and ItDictHt.
|
|
|
Get the next entry while visiting the Hash table (DictSetHT).
Definition at line 147 of file gdcmDictSet.cxx. References Dicts, gdcmAssertMacro, and ItDictHt.
|
|
|
Gets the print level for the Dicom Entries.
Definition at line 48 of file gdcmBase.h.
00048 { return PrintLevel; };
|
|
||||||||||||
|
Loads a dictionary from a specified file, and add it to already the existing ones contained in this DictSet.
Definition at line 72 of file gdcmDictSet.cxx. References AppendDict(), and gdcm::DictKey.
00074 {
00075 Dict *newDict = new Dict(filename);
00076 AppendDict(newDict, name);
00077
00078 return newDict;
00079 }
|
|
||||||||||||||||||||||||
|
Create a DictEntry which will be referenced in no dictionary.
Definition at line 102 of file gdcmDictSet.cxx. References gdcm::TagName, and VirtualEntry.
00107 {
00108 DictEntry *entry;
00109 const std::string tag = DictEntry::TranslateToKey(group,element)
00110 + "#" + vr + "#" + vm + "#" + name;
00111 TagKeyHT::iterator it;
00112
00113 it = VirtualEntry.find(tag);
00114 if(it != VirtualEntry.end())
00115 {
00116 entry = &(it->second);
00117 }
00118 else
00119 {
00120 DictEntry ent(group, element, vr, vm, name);
00121 VirtualEntry.insert(
00122 std::map<TagKey, DictEntry>::value_type
00123 (tag, ent));
00124 entry = &(VirtualEntry.find(tag)->second);
00125 }
00126
00127 return entry;
00128 }
|
|
||||||||||||
|
Print, in an informal fashion, the list of all the dictionaries contained is this DictSet, along with their respective content.
Reimplemented from gdcm::Base. Definition at line 211 of file gdcmDictSet.cxx. References Dicts.
|
|
|
Sets the print level for the Dicom Header Elements.
Definition at line 45 of file gdcmBase.h. Referenced by gdcm::SQItem::Print(), gdcm::SeqEntry::Print(), gdcm::FileHelper::Print(), gdcm::ElementSet::Print(), and gdcm::DicomDir::Print().
00045 { PrintLevel = level; };
|
|
|
Directory path to dictionaries.
Definition at line 83 of file gdcmDictSet.h. Referenced by DictSet(). |
|
|
Hash table of all dictionaries contained in this DictSet.
Definition at line 79 of file gdcmDictSet.h. Referenced by AppendDict(), DictSet(), GetDict(), GetFirstEntry(), GetNextEntry(), Print(), and ~DictSet(). |
|
|
Definition at line 80 of file gdcmDictSet.h. Referenced by GetFirstEntry(), and GetNextEntry(). |
|
|
Amount of printed details for each Dicom Entries : 0 : stands for the least detail level.
Definition at line 53 of file gdcmBase.h. Referenced by gdcm::Base::Base(). |
|
|
H table for the on the fly created DictEntries.
Definition at line 86 of file gdcmDictSet.h. Referenced by NewVirtualDictEntry(), and ~DictSet(). |
1.3.6