+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
//-----------------------------------------------------------------------------
// 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 : ";
//-----------------------------------------------------------------------------
// 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;
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)
//-----------------------------------------------------------------------------
// 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)
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();
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
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;
//-----------------------------------------------------------------------------
// 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)
//-----------------------------------------------------------------------------
// Print
+/**
+ * \ingroup gdcmPatient
+ * \brief Prints the Object
+ * @return
+ */
void gdcmPatient::Print(std::ostream &os)
{
os<<"PATIENT"<<std::endl;
//-----------------------------------------------------------------------------
// 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)
//-----------------------------------------------------------------------------
// Print
+/**
+ * \ingroup gdcmSerie
+ * \brief Prints the Object
+ * @return
+ */
void gdcmSerie::Print(std::ostream &os)
{
os<<"SERIE"<<std::endl;
//-----------------------------------------------------------------------------
// 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)
//-----------------------------------------------------------------------------
// Print
+/**
+ * \ingroup gdcmStudy
+ * \brief Prints the Object
+ * @return
+ */
void gdcmStudy::Print(std::ostream &os)
{
os<<"STUDY"<<std::endl;