00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 #ifndef _GDCMPATIENT_H_
00020 #define _GDCMPATIENT_H_
00021 
00022 #include "gdcmDicomDirObject.h"
00023 
00024 namespace GDCM_NAME_SPACE 
00025 {
00026 class DicomDirStudy;
00027 
00028 
00029 typedef std::list<DicomDirStudy*> ListDicomDirStudy;
00030 
00031 
00036 class GDCM_EXPORT DicomDirPatient : public DicomDirObject 
00037 {
00038    gdcmTypeMacro(DicomDirPatient);
00039 
00040 public:
00042    static DicomDirPatient *New(bool empty=false) {return new DicomDirPatient(empty);}
00043 
00044    void Print(std::ostream &os = std::cout, std::string const &indent = "" );
00045    void WriteContent(std::ofstream *fp, FileType t, bool insideMetaElements);
00046   
00047    
00049    void AddStudy(DicomDirStudy *obj) { Studies.push_back(obj); }
00050    DicomDirStudy *NewStudy(); 
00051    void ClearStudy();
00052 
00053    DicomDirStudy *GetFirstStudy();
00054    DicomDirStudy *GetNextStudy();
00055    DicomDirStudy *GetLastStudy();
00057    int            GetNumberOfStudies() { return Studies.size();}
00058    virtual void Copy(DocEntrySet *set);
00059 
00060 protected:
00061    DicomDirPatient(bool empty=false); 
00062    ~DicomDirPatient();
00063 
00064 private:
00066    ListDicomDirStudy Studies;
00068    ListDicomDirStudy::iterator ItStudy;
00069 };
00070 } 
00071 
00072 
00073 #endif