]> Creatis software - gdcm.git/blobdiff - src/gdcmObject.cxx
*** empty log message ***
[gdcm.git] / src / gdcmObject.cxx
index 188a98385ee51205ee70ac7e3e3087e2b974ecd5..82ff513148fd592804274be4f192f2b9d4afea78 100644 (file)
@@ -5,6 +5,12 @@
 
 //-----------------------------------------------------------------------------
 // Constructor / Destructor
+/**
+ * \ingroup gdcmObject
+ * \brief   
+ * @param   begin iterator of begin for the object
+ * @param   end   iterator of end for the object
+ */
 gdcmObject::gdcmObject(ListTag::iterator begin,ListTag::iterator end) 
 {
    beginObj=begin;
@@ -14,23 +20,40 @@ gdcmObject::gdcmObject(ListTag::iterator begin,ListTag::iterator end)
       dbg.Verbose(0, "gdcmObject::gdcmObject empty list");
 }
 
+/**
+ * \ingroup gdcmObject
+ * \brief   Canonical destructor.
+ */
 gdcmObject::~gdcmObject(void) 
 {
 }
 
 //-----------------------------------------------------------------------------
 // Print
+/**
+ * \ingroup gdcmObject
+ * \brief   Prints the Object
+ * @return
+ */ 
 void gdcmObject::Print(std::ostream &os)
 {
-   for(ListTag::iterator i=beginObj;i!=endObj;++i)
+   if(printLevel>=0)
    {
-      (*i)->SetPrintLevel(printLevel);
-      (*i)->Print(os);
+      for(ListTag::iterator i=beginObj;i!=endObj;++i)
+      {
+         (*i)->SetPrintLevel(printLevel);
+         (*i)->Print(os);
+      }
    }
 }
 
 //-----------------------------------------------------------------------------
 // Public
+/**
+ * \ingroup gdcmObject
+ * \brief   Get an entry by number
+ * @return
+ */ 
 std::string gdcmObject::GetEntryByNumber(guint16 group, guint16 element) 
 {
    for(ListTag::iterator i=beginObj;i!=endObj;++i)
@@ -42,7 +65,12 @@ std::string gdcmObject::GetEntryByNumber(guint16 group, guint16 element)
    return GDCM_UNFOUND;
 }
 
-
+/**
+ * \ingroup gdcmObject
+ * \brief   Get an entry by name
+ * @param   name name of the searched element.
+ * @return
+ */ 
 std::string gdcmObject::GetEntryByName(TagName name) 
 {
    gdcmDict *PubDict=gdcmGlobal::GetDicts()->GetDefaultPubDict();
@@ -53,6 +81,40 @@ std::string gdcmObject::GetEntryByName(TagName name)
    return GetEntryByNumber(dictEntry->GetGroup(),dictEntry->GetElement()); 
 }
 
+/**
+ * \ingroup gdcmObject
+ * \brief   Get all entries in a hash table
+ * @return
+ */ 
+TagHeaderEntryHT gdcmObject::GetEntry(void)
+{
+   TagHeaderEntryHT HT;
+
+   for(ListTag::iterator it=beginObj;it!=endObj;++it)
+   {
+      HT.insert( PairHT( (*it)->GetKey(),(*it)) );
+   }
+
+   return(HT);
+}
+
+/**
+ * \ingroup gdcmObject
+ * \brief   Get all entries in a list
+ * @return
+ */ 
+ListTag gdcmObject::GetListEntry(void)
+{
+   ListTag list;
+
+   for(ListTag::iterator it=beginObj;it!=endObj;++it)
+   {
+      list.push_back(*it);
+   }
+
+   return(list);
+}
+
 //-----------------------------------------------------------------------------
 // Protected