- /// \brief canonical Printer
- /// \sa SetPrintLevel
- virtual void Print(std::ostream &os = std::cout);
-
-// Informations contained in the parser
- virtual bool IsReadable(void);
-
- /// Returns a pointer to the gdcmDicomDirMeta for this DICOMDIR.
- gdcmDicomDirMeta* GetDicomDirMeta() { return metaElems; };
-
- /// Returns the PATIENT chained List for this DICOMDIR.
- 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 *);
+ DicomDir( std::string const &filename, bool parseDir = false );
+ DicomDir();
+
+ ~DicomDir();
+
+ bool Load( std::string const &filename );
+ void Print(std::ostream &os = std::cout, std::string const &indent = "" );
+
+ void SetParseDir(bool parseDir) { ParseDir = parseDir; };
+ // 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 unnecessary 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 );