+/**
+ * \brief canonical destructor
+ */
+DicomDirElement::~DicomDirElement()
+{
+ DicomDirMetaList.clear();
+ DicomDirPatientList.clear();
+ DicomDirStudyList.clear();
+ DicomDirSerieList.clear();
+ DicomDirImageList.clear();
+}
+
+//-----------------------------------------------------------------------------
+// Public
+/**
+ * \brief Add an entry to one of the DicomDir Elements
+ * (Patient, Study, Serie, Image)
+ * @param type Element type (DD_PATIENT, DD_STUDY, DD_SERIE, DD_IMAGE)
+ * @param elem elem
+ */
+bool DicomDirElement::AddEntry(DicomDirType type, Element const &elem)
+{
+ switch( type )
+ {
+ case DD_META :
+ DicomDirMetaList.push_back(elem);
+ break;
+ case DD_PATIENT :
+ DicomDirPatientList.push_back(elem);
+ break;
+ case DD_STUDY :
+ DicomDirStudyList.push_back(elem);
+ break;
+ case DD_SERIE :
+ DicomDirSerieList.push_back(elem);
+ break;
+ case DD_IMAGE :
+ DicomDirImageList.push_back(elem);
+ break;
+ default :
+ return false;