+ * \brief This predicate, based on hopefully reasonable heuristics,
+ * decides whether or not the current header was properly parsed
+ * and contains the mandatory information for being considered as
+ * a well formed and usable DicomDir.
+ * @return true when Document is the one of a reasonable DicomDir,
+ * false otherwise.
+ */
+bool DicomDir::IsReadable()
+{
+ if( !Document::IsReadable() )
+ {
+ return false;
+ }
+ if( !MetaElems )
+ {
+ return false;
+ }
+ if( Patients.size() <= 0 )
+ {
+ return false;
+ }
+
+ return true;
+}
+
+/**
+ * \brief Sets all fields to NULL
+ */
+
+void DicomDir::Initialize()
+{
+ StartMethod = NULL;
+ ProgressMethod = NULL;
+ EndMethod = NULL;
+ StartMethodArgDelete = NULL;
+ ProgressMethodArgDelete = NULL;
+ EndMethodArgDelete = NULL;
+ StartArg = NULL;
+ ProgressArg = NULL;
+ EndArg = NULL;
+
+ Progress = 0.0;
+ Abort = false;
+
+ MetaElems = 0;
+}
+
+
+/**
+ * \ingroup DicomDir
+ * \brief fills the whole structure, starting from a root Directory
+ */
+void DicomDir::ParseDirectory()
+{
+ CreateDicomDirChainedList( GetFileName() );
+ CreateDicomDir();
+}
+
+/**
+ * \ingroup DicomDir
+ * \brief Set the start method to call when the parsing of the directory starts
+ * @param method Method to call
+ * @param arg Argument to pass to the method
+ * @param argDelete Argument
+ * \warning In python : the arg parameter isn't considered
+ */
+void DicomDir::SetStartMethod(Method* method, void* arg,
+ Method* argDelete )
+{
+ if( StartArg && StartMethodArgDelete )
+ {
+ StartMethodArgDelete( StartArg );
+ }
+
+ StartMethod = method;
+ StartArg = arg;
+ StartMethodArgDelete = argDelete;
+}
+
+/**
+ * \ingroup DicomDir
+ * \brief Set the method to delete the argument
+ * The argument is destroyed when the method is changed or when the
+ * class is destroyed
+ * @param method Method to call to delete the argument
+ */
+void DicomDir::SetStartMethodArgDelete(Method* method)
+{
+ StartMethodArgDelete = method;
+}
+
+/**
+ * \ingroup DicomDir
+ * \brief Set the progress method to call when the parsing of the directory progress
+ * @param method Method to call
+ * @param arg Argument to pass to the method
+ * @param argDelete Argument
+ * \warning In python : the arg parameter isn't considered
+ */
+void DicomDir::SetProgressMethod(Method* method, void* arg,
+ Method* argDelete )
+{
+ if( ProgressArg && ProgressMethodArgDelete )
+ {
+ ProgressMethodArgDelete( ProgressArg );
+ }
+
+ ProgressMethod = method;
+ ProgressArg = arg;
+ ProgressMethodArgDelete = argDelete;
+}
+
+/**
+ * \ingroup DicomDir
+ * \brief Set the method to delete the argument
+ * The argument is destroyed when the method is changed or when the
+ * class is destroyed
+ * @param method Method to call to delete the argument
+ */
+void DicomDir::SetProgressMethodArgDelete(Method* method)
+{
+ ProgressMethodArgDelete = method;
+}
+
+/**
+ * \ingroup DicomDir
+ * \brief Set the end method to call when the parsing of the directory ends
+ * @param method Method to call
+ * @param arg Argument to pass to the method
+ * @param argDelete Argument
+ * \warning In python : the arg parameter isn't considered
+ */
+void DicomDir::SetEndMethod(Method* method, void* arg,
+ Method* argDelete )
+{
+ if( EndArg && EndMethodArgDelete )
+ {
+ EndMethodArgDelete( EndArg );
+ }
+
+ EndMethod = method;
+ EndArg = arg;
+ EndMethodArgDelete = argDelete;
+}
+
+/**
+ * \ingroup DicomDir
+ * \brief Set the method to delete the argument
+ * The argument is destroyed when the method is changed or when the class
+ * is destroyed
+ * @param method Method to call to delete the argument
+ */
+void DicomDir::SetEndMethodArgDelete(Method* method)
+{
+ EndMethodArgDelete = method;
+}
+
+/**
+ * \ingroup DicomDir