]> Creatis software - gdcm.git/commitdiff
* ENH : add methods in gdcmObject to get the hash table or the list of
authorregrain <regrain>
Thu, 5 Feb 2004 10:53:41 +0000 (10:53 +0000)
committerregrain <regrain>
Thu, 5 Feb 2004 10:53:41 +0000 (10:53 +0000)
       header entries
     -- BeNours

ChangeLog
src/gdcmImage.cxx
src/gdcmObject.cxx
src/gdcmObject.h
src/gdcmPatient.cxx
src/gdcmSerie.cxx
src/gdcmStudy.cxx

index 05f1474d824d50d1d15c582d7cec7174b11f5528..cfad4d3f231a44112cf09a8944b9e131db0a5535 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-02-05 Benoit Regrain
+     * ENH : add methods in gdcmObject to get the hash table or the list of
+       header entries
+
 2004-02-04 Benoit Regrain
      * FIX : even length for some strings when writting the dicom dir
      * FIX : sort the images in the dicom dir
index e47585aaf072023242169986a735c2c4658b21f4..5484f9d92bc0e4c9ced0f75d14b9ee700125891c 100644 (file)
@@ -4,17 +4,32 @@
 
 //-----------------------------------------------------------------------------
 // Constructor / Destructor
+/**
+ * \ingroup gdcmImage
+ * \brief   
+ * @param   begin iterator of begin for the object
+ * @param   end   iterator of end for the object
+ */
 gdcmImage::gdcmImage(ListTag::iterator begin,ListTag::iterator end):
    gdcmObject(begin,end)
 {
 }
 
+/**
+ * \ingroup gdcmImage
+ * \brief   Canonical destructor.
+ */
 gdcmImage::~gdcmImage() 
 {
 }
 
 //-----------------------------------------------------------------------------
 // Print
+/**
+ * \ingroup gdcmImage
+ * \brief   Prints the Object
+ * @return
+ */ 
 void gdcmImage::Print(std::ostream &os)
 {
    os<<"IMAGE : ";
index 93942bdd8b0f314b59579259938326082ddd993c..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,12 +20,21 @@ 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)
 {
    if(printLevel>=0)
@@ -34,6 +49,11 @@ void gdcmObject::Print(std::ostream &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)
@@ -45,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();
@@ -56,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
 
index ff560f5584d8063eede55cf7cc91d5bda9b4ca40..b84575468b045d296d987121a13dde3157d071cd 100644 (file)
@@ -26,6 +26,9 @@ public:
    std::string GetEntryByNumber(guint16 group, guint16 element);
    std::string GetEntryByName(TagName name);
 
+   TagHeaderEntryHT GetEntry(void);
+   ListTag GetListEntry(void);
+
 protected:
    ListTag::iterator beginObj;
    ListTag::iterator endObj;
index 11ec6ac809806eaaef31294e7719b922a17ca89a..e7f8ed4ad1f7d20abb3b6a3ff917f10956eb6e3b 100644 (file)
@@ -4,11 +4,21 @@
 
 //-----------------------------------------------------------------------------
 // Constructor / Destructor
+/**
+ * \ingroup gdcmPatient
+ * \brief   
+ * @param   begin iterator of begin for the object
+ * @param   end   iterator of end for the object
+ */
 gdcmPatient::gdcmPatient(ListTag::iterator begin,ListTag::iterator end):
    gdcmObject(begin,end)
 {
 }
 
+/**
+ * \ingroup gdcmPatient
+ * \brief   Canonical destructor.
+ */
 gdcmPatient::~gdcmPatient() 
 {
    for(ListStudy::iterator cc = studies.begin();cc != studies.end();++cc)
@@ -19,6 +29,11 @@ gdcmPatient::~gdcmPatient()
 
 //-----------------------------------------------------------------------------
 // Print
+/**
+ * \ingroup gdcmPatient
+ * \brief   Prints the Object
+ * @return
+ */ 
 void gdcmPatient::Print(std::ostream &os)
 {
    os<<"PATIENT"<<std::endl;
index b21c241745f304608e2f869508afab819d928a46..1ad1b6fddadac81a8f367bae4785d93efee022f7 100644 (file)
@@ -4,11 +4,21 @@
 
 //-----------------------------------------------------------------------------
 // Constructor / Destructor
+/**
+ * \ingroup gdcmSerie
+ * \brief   
+ * @param   begin iterator of begin for the object
+ * @param   end   iterator of end for the object
+ */
 gdcmSerie::gdcmSerie(ListTag::iterator begin,ListTag::iterator end):
    gdcmObject(begin,end)
 {
 }
 
+/**
+ * \ingroup gdcmSerie
+ * \brief   Canonical destructor.
+ */
 gdcmSerie::~gdcmSerie() 
 {
    for(ListImage::iterator cc = images.begin();cc != images.end();++cc)
@@ -19,6 +29,11 @@ gdcmSerie::~gdcmSerie()
 
 //-----------------------------------------------------------------------------
 // Print
+/**
+ * \ingroup gdcmSerie
+ * \brief   Prints the Object
+ * @return
+ */ 
 void gdcmSerie::Print(std::ostream &os)
 {
    os<<"SERIE"<<std::endl;
index 29af9518b1007a961dbb06cb1d123e55a17dd5f3..d57391e27866cefdbfc20e90893b5955f2c03a55 100644 (file)
@@ -4,11 +4,21 @@
 
 //-----------------------------------------------------------------------------
 // Constructor / Destructor
+/**
+ * \ingroup gdcmStudy
+ * \brief   
+ * @param   begin iterator of begin for the object
+ * @param   end   iterator of end for the object
+ */
 gdcmStudy::gdcmStudy(ListTag::iterator begin,ListTag::iterator end):
    gdcmObject(begin,end)
 {
 }
 
+/**
+ * \ingroup gdcmStudy
+ * \brief   Canonical destructor.
+ */
 gdcmStudy::~gdcmStudy() 
 {
    for(ListSerie::iterator cc = series.begin();cc != series.end();++cc)
@@ -19,6 +29,11 @@ gdcmStudy::~gdcmStudy()
 
 //-----------------------------------------------------------------------------
 // Print
+/**
+ * \ingroup gdcmStudy
+ * \brief   Prints the Object
+ * @return
+ */ 
 void gdcmStudy::Print(std::ostream &os)
 {
    os<<"STUDY"<<std::endl;