-// gdcmDicomDir(ListTag *l, bool exception_on_error = false);
- gdcmDicomDir(const char *FileName,
- bool parseDir = false,
- bool exception_on_error = false);
-
- ~gdcmDicomDir(void);
-
- void SetPrintLevel(int level) { printLevel = level; };
- virtual void Print(std::ostream &os = std::cout);
-
-// Informations contained in the parser
- virtual bool IsReadable(void);
- inline gdcmMeta *GetMeta() {return metaElems;};
- inline ListPatient &GetPatients() {return patients;};
-
-// Parsing
- void ParseDirectory(void);
-
- inline void SetStartMethod(gdcmMethod *method,void *arg=NULL) {startMethod=method;startArg=arg;};
- inline void SetProgressMethod(gdcmMethod *method,void *arg=NULL) {progressMethod=method;progressArg=arg;};
- inline void SetEndMethod(gdcmMethod *method,void *arg=NULL) {endMethod=method;endArg=arg;};
-
- inline float GetProgress(void) {return(progress);};
-
- inline void AbortProgress(void) {abort=true;};
- inline bool IsAborted(void) {return(abort);};
-
-// Write
- bool Write(std::string fileName);
-
-// Types
+ typedef void(Method)(void*);
+
+ DicomDir( std::string const &filename, bool parseDir = false );
+ DicomDir();
+
+ ~DicomDir();
+
+ void Print(std::ostream &os = std::cout, std::string const &indent = "" );
+
+ // 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();
+
+ // Note: the DicomDir:: namespace prefix is needed by Swig in the
+ // following method declarations. Refer to gdcmPython/gdcm.i
+ // for the reasons of this unecessary notation at C++ level.
+ void SetStartMethod( DicomDir::Method *method,
+ void *arg = NULL,
+ DicomDir::Method *argDelete = NULL );
+ void SetProgressMethod( DicomDir::Method *method,
+ void *arg = NULL,
+ DicomDir::Method *argDelete = NULL );
+ void SetEndMethod( DicomDir::Method *method,
+ void *arg = NULL,
+ DicomDir::Method *argDelete = NULL );
+ void SetStartMethodArgDelete( DicomDir::Method *m );
+ void SetProgressMethodArgDelete( DicomDir::Method *m );
+ void SetEndMethodArgDelete( DicomDir::Method *m );
+
+ /// GetProgress GetProgress
+ float GetProgress() { return Progress; };
+ /// AbortProgress AbortProgress
+ void AbortProgress() { Abort = true; };
+ /// IsAborted IsAborted
+ bool IsAborted() { return Abort; };
+
+ // Write
+ bool WriteDicomDir(std::string const &fileName);
+
+ /// Types of the DicomDirObject within the DicomDir