2 //-----------------------------------------------------------------------------
3 #include "gdcmObject.h"
6 //-----------------------------------------------------------------------------
7 // Constructor / Destructor
8 gdcmObject::gdcmObject(ListTag::iterator begin,ListTag::iterator end)
14 dbg.Verbose(0, "gdcmObject::gdcmObject empty list");
17 gdcmObject::~gdcmObject(void)
21 //-----------------------------------------------------------------------------
23 void gdcmObject::Print(std::ostream &os)
27 for(ListTag::iterator i=beginObj;i!=endObj;++i)
29 (*i)->SetPrintLevel(printLevel);
35 //-----------------------------------------------------------------------------
37 std::string gdcmObject::GetEntryByNumber(guint16 group, guint16 element)
39 for(ListTag::iterator i=beginObj;i!=endObj;++i)
41 if ( (*i)->GetGroup()==group && (*i)->GetElement()==element)
42 return (*i)->GetValue();
49 std::string gdcmObject::GetEntryByName(TagName name)
51 gdcmDict *PubDict=gdcmGlobal::GetDicts()->GetDefaultPubDict();
52 gdcmDictEntry *dictEntry = (*PubDict).GetDictEntryByName(name);
54 if( dictEntry == NULL)
56 return GetEntryByNumber(dictEntry->GetGroup(),dictEntry->GetElement());
59 //-----------------------------------------------------------------------------
62 //-----------------------------------------------------------------------------
65 //-----------------------------------------------------------------------------