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)
25 for(ListTag::iterator i=beginObj;i!=endObj;++i)
27 (*i)->SetPrintLevel(printLevel);
32 //-----------------------------------------------------------------------------
34 std::string gdcmObject::GetEntryByNumber(guint16 group, guint16 element)
36 for(ListTag::iterator i=beginObj;i!=endObj;++i)
38 if ( (*i)->GetGroup()==group && (*i)->GetElement()==element)
39 return (*i)->GetValue();
46 std::string gdcmObject::GetEntryByName(TagName name)
48 gdcmDict *PubDict=gdcmGlobal::GetDicts()->GetDefaultPubDict();
49 gdcmDictEntry *dictEntry = (*PubDict).GetDictEntryByName(name);
51 if( dictEntry == NULL)
53 return GetEntryByNumber(dictEntry->GetGroup(),dictEntry->GetElement());
56 //-----------------------------------------------------------------------------
59 //-----------------------------------------------------------------------------
62 //-----------------------------------------------------------------------------