-// gdcmDicomDir(ListTag *l,
-// bool exception_on_error = false);
- gdcmDicomDir(const char *FileName,
- bool parseDir = false,
- bool exception_on_error = false);
- gdcmDicomDir(bool exception_on_error = false);
-
- ~gdcmDicomDir(void);
-
- /**
- * \ingroup gdcmDicomDir
- * \brief Sets the print level for the Dicom Header
- * \note 0 for Light Print; 1 for 'medium' Print, 2 for Heavy
- */
- void SetPrintLevel(int level)
- { printLevel = level; };
- /**
- * \ingroup gdcmDicomDir
- * \brief canonical Printer
- * \sa SetPrintLevel
- */
- virtual void Print(std::ostream &os = std::cout);
-
-// Informations contained in the parser
- virtual bool IsReadable(void);
-
-/// \brief returns a pointer to the gdcmDicomDirMeta for this DICOMDIR.
- inline gdcmDicomDirMeta *GetDicomDirMeta()
- {return metaElems;};
-
- /// \brief returns the PATIENT chained List for this DICOMDIR.
- inline ListDicomDirPatient &GetDicomDirPatients()
- {return patients;};
-
-// Parsing
- void ParseDirectory(void);
-
- void SetStartMethod(gdcmMethod *,void * =NULL,gdcmMethod * =NULL);
- void SetStartMethodArgDelete(gdcmMethod *);
- void SetProgressMethod(gdcmMethod *,void * =NULL,gdcmMethod * =NULL);
- void SetProgressMethodArgDelete(gdcmMethod *);
- void SetEndMethod(gdcmMethod *,void * =NULL,gdcmMethod * =NULL);
- void SetEndMethodArgDelete(gdcmMethod *);
-
-/// \brief GetProgress GetProgress
- inline float GetProgress(void)
- {return(progress);};
-
-/// \brief AbortProgress AbortProgress
- inline void AbortProgress(void)
- {abort=true; };
-
-/// \brief IsAborted IsAborted
- inline bool IsAborted(void)
- {return(abort); };
-
-// Adding
- gdcmDicomDirMeta * NewMeta(void);
- gdcmDicomDirPatient * NewPatient(void);
-
-// Write
- void WriteEntries(FILE *_fp);
- bool Write(std::string fileName);
-
-/// Types of the gdcmObject within the gdcmDicomDir
+/// \brief Constructs a DicomDir with a RefCounter
+ static DicomDir *New() {return new DicomDir();}
+
+// GDCM_LEGACY( bool Load(std::string const &filename) )
+ bool Load( );
+ void Print(std::ostream &os = std::cout, std::string const &indent = "" );
+
+ /// Sets the root Directory name to parse, recursively
+ void SetDirectoryName(std::string const &dirName)
+ { ParseDir = true; if (Filename != dirName)
+ Filename = dirName, IsDocumentModified = true;}
+ /// Accessor to \ref Filename
+ virtual void SetFileName(std::string const &fileName)
+ { ParseDir = false; if (Filename != fileName)
+ Filename = fileName, IsDocumentModified = true;}
+
+ // Informations contained in the parser
+ virtual bool IsReadable();
+
+ // Meta
+ DicomDirMeta *NewMeta();
+ /// Returns a pointer to the DicomDirMeta for this DICOMDIR.
+ DicomDirMeta *GetMeta() { return MetaElems; }
+
+ // Patients
+ DicomDirPatient *NewPatient();
+ void ClearPatient();
+
+ DicomDirPatient *GetFirstPatient();
+ DicomDirPatient *GetNextPatient();
+
+ // Parsing
+ void ParseDirectory();
+
+ /// GetProgress GetProgress
+ float GetProgress() const { return Progress; }
+ /// AbortProgress AbortProgress
+ void AbortProgress() { Abort = true; }
+ /// IsAborted IsAborted
+ bool IsAborted() { return Abort; }
+
+ // Write
+ bool Write(std::string const &fileName);
+
+ bool Anonymize();
+
+ virtual void Copy(DocEntrySet *set);
+
+ /// Types of the DicomDirObject within the DicomDir