#include <gdcmDictSet.h>
Inheritance diagram for gdcm::DictSet:
Public Member Functions | |
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 () |
Returns the default reference DICOM V3 public dictionary. | |
Dict * | GetFirstDict () |
Get the first dictionary while visiting the DictSet. | |
Dict * | GetNextDict () |
Get the next dictionary while visiting the Hash table (DictSetHT). | |
void | Delete () |
Delete the object. | |
void | Register () |
Register the object. | |
void | Unregister () |
Unregister the object. | |
const unsigned long & | GetRefCount () const |
Get the reference counting. | |
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 | |
static DictSet * | New () |
Contructs a DictSet with a RefCounter. | |
static 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 | |
DictSet () | |
The Dictionary Set obtained with this constructor simply contains the Default Public dictionary. | |
~DictSet () | |
Destructor. | |
Protected Attributes | |
int | PrintLevel |
Amount of printed details for each Dicom Entries : 0 : stands for the least detail level. | |
Private Member Functions | |
gdcmTypeMacro (DictSet) | |
Private Attributes | |
DictSetHT | Dicts |
Hash table of all dictionaries contained in this DictSet. | |
DictSetHT::iterator | ItDictHt |
Iterator to visit the Dictionaries of a given DictSet. | |
std::string | DictPath |
Directory path to dictionaries. |
Definition at line 41 of file gdcmDictSet.h.
|
The Dictionary Set obtained with this constructor simply contains the Default Public dictionary.
Definition at line 34 of file gdcmDictSet.cxx. References BuildDictPath(), DictPath, Dicts, gdcm::Dict::New(), PUB_DICT_FILENAME, and PUB_DICT_NAME. 00035 { 00036 DictPath = BuildDictPath(); 00037 std::string pubDictFile(DictPath); 00038 pubDictFile += PUB_DICT_FILENAME; 00039 Dicts[PUB_DICT_NAME] = Dict::New(pubDictFile); 00040 }
|
|
Destructor.
Definition at line 45 of file gdcmDictSet.cxx. References Dicts. 00046 { 00047 // Remove dictionaries 00048 for (DictSetHT::iterator tag = Dicts.begin(); tag != Dicts.end(); ++tag) 00049 { 00050 if ( tag->second ) 00051 tag->second->Delete(); 00052 } 00053 Dicts.clear(); 00054 }
|
|
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 125 of file gdcmDictSet.cxx. References gdcmStaticWarningMacro, and PUB_DICT_PATH. Referenced by gdcm::DicomDirElement::DicomDirElement(), gdcm::DictGroupName::DictGroupName(), DictSet(), and gdcm::VR::VR(). 00126 { 00127 std::string resultPath; 00128 const char *envPath; 00129 envPath = getenv("GDCM_DICT_PATH"); 00130 00131 if (envPath && (strlen(envPath) != 0)) 00132 { 00133 resultPath = envPath; 00134 gdcmStaticWarningMacro( "Dictionary path set from environnement"); 00135 } 00136 else 00137 { 00138 resultPath = PUB_DICT_PATH; 00139 } 00140 if ( resultPath[resultPath.length()-1] != '/' ) 00141 { 00142 resultPath += '/'; 00143 } 00144 00145 return resultPath; 00146 }
|
|
|
|
|
Returns the default reference DICOM V3 public dictionary.
Definition at line 61 of file gdcmDictSet.h. References PUB_DICT_NAME. Referenced by gdcm::DicomDirObject::FillObject(), gdcm::DocEntrySet::GetDictEntry(), and gdcm::Document::Initialize(). 00061 { return GetDict(PUB_DICT_NAME); }
|
|
Retrieve the specified dictionary (when existing) from this DictSet.
Definition at line 81 of file gdcmDictSet.cxx. References Dicts. Referenced by gdcm::Document::SetShaDict(). 00082 { 00083 DictSetHT::iterator dict = Dicts.find(dictName); 00084 if ( dict != Dicts.end() ) 00085 { 00086 return dict->second; 00087 } 00088 return NULL; 00089 }
|
|
Get the first dictionary while visiting the DictSet.
Definition at line 95 of file gdcmDictSet.cxx. References Dicts, and ItDictHt. 00096 { 00097 ItDictHt = Dicts.begin(); 00098 if ( ItDictHt != Dicts.end() ) 00099 return ItDictHt->second; 00100 return NULL; 00101 }
|
|
Get the next dictionary while visiting the Hash table (DictSetHT).
Definition at line 108 of file gdcmDictSet.cxx. References Dicts, gdcmAssertMacro, and ItDictHt. 00109 { 00110 gdcmAssertMacro (ItDictHt != Dicts.end()); 00111 00112 ++ItDictHt; 00113 if ( ItDictHt != Dicts.end() ) 00114 return ItDictHt->second; 00115 return NULL; 00116 }
|
|
Gets the print level for the Dicom Entries.
Definition at line 50 of file gdcmBase.h. 00050 { return PrintLevel; }
|
|
Get the reference counting.
Definition at line 56 of file gdcmRefCounter.h. 00057 { 00058 return RefCount; 00059 }
|
|
Loads a dictionary from a specified file, and add it to already the existing ones contained in this DictSet.
Definition at line 66 of file gdcmDictSet.cxx. References Dicts, and gdcm::Dict::New(). 00068 { 00069 Dict *newDict = Dict::New(filename); 00070 Dicts[name] = newDict; 00071 00072 return newDict; 00073 }
|
|
Contructs a DictSet with a RefCounter.
Definition at line 47 of file gdcmDictSet.h. Referenced by gdcm::Global::Global(). 00047 {return new DictSet();}
|
|
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 162 of file gdcmDictSet.cxx. References Dicts. 00163 { 00164 for (DictSetHT::iterator dict = Dicts.begin(); dict != Dicts.end(); ++dict) 00165 { 00166 os << "Printing dictionary " << dict->first << std::endl; 00167 dict->second->Print(os); 00168 } 00169 }
|
|
Register the object.
Definition at line 44 of file gdcmRefCounter.h. Referenced by gdcm::SQItem::AddEntry(), gdcm::ElementSet::AddEntry(), gdcm::Dict::AddEntry(), gdcm::SeqEntry::AddSQItem(), gdcm::SeqEntry::Copy(), gdcm::DicomDir::Copy(), gdcm::DocEntry::DocEntry(), gdcm::FileHelper::FileHelper(), gdcm::DocEntrySet::GetDictEntry(), gdcm::CommandManager::InSetCommand(), gdcm::DocEntryArchive::Push(), gdcm::Dict::ReplaceEntry(), and gdcm::SeqEntry::SetDelimitationItem(). 00044 { RefCount++; }
|
|
Sets the print level for the Dicom Header Elements.
Definition at line 47 of file gdcmBase.h. Referenced by gdcm::SQItem::Print(), gdcm::SeqEntry::Print(), gdcm::FileHelper::Print(), gdcm::ElementSet::Print(), and gdcm::DicomDir::Print(). 00047 { PrintLevel = level; }
|
|
Unregister the object.
Definition at line 48 of file gdcmRefCounter.h. Referenced by gdcm::SeqEntry::ClearSQItem(), gdcm::DicomDir::Copy(), gdcm::DocEntrySet::GetDictEntry(), gdcm::CommandManager::InSetCommand(), gdcm::DocEntrySet::NewDataEntry(), gdcm::DocEntrySet::NewSeqEntry(), gdcm::Document::ReadNextDocEntry(), gdcm::SQItem::RemoveEntry(), gdcm::ElementSet::RemoveEntry(), gdcm::SeqEntry::SetDelimitationItem(), gdcm::DocEntry::~DocEntry(), and gdcm::FileHelper::~FileHelper().
|
|
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 78 of file gdcmDictSet.h. Referenced by DictSet(), GetDict(), GetFirstDict(), GetNextDict(), LoadDictFromFile(), Print(), and ~DictSet(). |
|
Iterator to visit the Dictionaries of a given DictSet.
Definition at line 80 of file gdcmDictSet.h. Referenced by GetFirstDict(), and GetNextDict(). |
|
Amount of printed details for each Dicom Entries : 0 : stands for the least detail level.
Definition at line 55 of file gdcmBase.h. Referenced by gdcm::SQItem::Print(), gdcm::SeqEntry::Print(), gdcm::FileHelper::Print(), gdcm::ElementSet::Print(), gdcm::DocEntry::Print(), gdcm::DictEntry::Print(), gdcm::DicomDirStudy::Print(), gdcm::DicomDirSerie::Print(), gdcm::DicomDirPatient::Print(), gdcm::DicomDirMeta::Print(), gdcm::DicomDir::Print(), and gdcm::DataEntry::Print(). |