1 // gdcmDicomDirPatient.cxx
2 //-----------------------------------------------------------------------------
3 #include "gdcmDicomDirPatient.h"
4 #include "gdcmDicomDirElement.h"
6 //-----------------------------------------------------------------------------
7 // Constructor / Destructor
9 * \ingroup gdcmDicomDirPatient
11 * @param begin iterator (inside the gdcmParser chained list)
12 * on the first Header Entry (i.e Dicom Element)
13 * related to this "PATIENT" part
14 * @param end iterator (inside the gdcmParser chained list)
15 * on the last Header Entry (i.e Dicom Element)
16 * related to this 'PATIENT' part
17 * @param ptagHT pointer to the HTable (gdcmObject needs it
18 * to build the gdcmHeaderEntries)
19 * @param plistEntries pointer to the chained List (gdcmObject needs it
20 * to build the gdcmHeaderEntries)
22 gdcmDicomDirPatient::gdcmDicomDirPatient(ListTag::iterator begin,
23 ListTag::iterator end,
24 TagHeaderEntryHT *ptagHT,
25 ListTag *plistEntries):
26 gdcmObject(begin,end,ptagHT,plistEntries)
31 * \ingroup gdcmDicomDirPatient
32 * \brief Canonical destructor.
34 gdcmDicomDirPatient::~gdcmDicomDirPatient()
36 for(ListDicomDirStudy::iterator cc = studies.begin();cc != studies.end();++cc)
42 //-----------------------------------------------------------------------------
45 * \ingroup gdcmDicomDirPatient
46 * \brief Prints the Object
49 void gdcmDicomDirPatient::Print(std::ostream &os)
51 os<<"PATIENT"<<std::endl;
52 gdcmObject::Print(os);
54 for(ListDicomDirStudy::iterator cc = studies.begin();cc!=studies.end();++cc)
56 (*cc)->SetPrintLevel(printLevel);
61 //-----------------------------------------------------------------------------
65 * \ingroup gdcmDicomDir
66 * \brief adds a new Patient at the begining of the PatientList
67 * of a partially created DICOMDIR
69 gdcmDicomDirStudy * gdcmDicomDirPatient::NewStudy(void) {
70 std::list<gdcmElement> elemList;
71 elemList=gdcmGlobal::GetDicomDirElements()->GetDicomDirStudyElements();
74 gdcmDicomDirStudy *st = new gdcmDicomDirStudy(i, j, ptagHT, plistEntries);
75 studies.push_front(st);
81 //-----------------------------------------------------------------------------
84 //-----------------------------------------------------------------------------
87 //-----------------------------------------------------------------------------