1 // gdcmDicomDirPatient.cxx
2 //-----------------------------------------------------------------------------
3 #include "gdcmDicomDirPatient.h"
4 #include "gdcmDicomDirElement.h"
5 #include "gdcmGlobal.h"
7 //-----------------------------------------------------------------------------
8 // Constructor / Destructor
10 * \ingroup gdcmDicomDirPatient
12 * @param s SQ Item holding the elements related to this "PATIENT" part
13 * @param ptagHT pointer to the HTable (gdcmObject needs it
14 * to build the gdcmHeaderEntries)
16 gdcmDicomDirPatient::gdcmDicomDirPatient(gdcmSQItem *s, TagDocEntryHT *ptagHT):
19 docEntries = s->GetDocEntries();
22 gdcmDicomDirPatient::gdcmDicomDirPatient(TagDocEntryHT *ptagHT):
27 * \ingroup gdcmDicomDirPatient
28 * \brief Canonical destructor.
30 gdcmDicomDirPatient::~gdcmDicomDirPatient()
32 for(ListDicomDirStudy::iterator cc = studies.begin();cc != studies.end();++cc)
38 //-----------------------------------------------------------------------------
41 * \ingroup gdcmDicomDirPatient
42 * \brief Prints the Object
45 void gdcmDicomDirPatient::Print(std::ostream &os)
47 os<<"PATIENT"<<std::endl;
48 gdcmObject::Print(os);
50 for(ListDicomDirStudy::iterator cc = studies.begin();cc!=studies.end();++cc)
52 (*cc)->SetPrintLevel(printLevel);
57 //-----------------------------------------------------------------------------
61 * \ingroup gdcmDicomDir
62 * \brief adds a new Patient at the begining of the PatientList
63 * of a partially created DICOMDIR
65 gdcmDicomDirStudy * gdcmDicomDirPatient::NewStudy(void) {
66 std::list<gdcmElement> elemList;
67 elemList=gdcmGlobal::GetDicomDirElements()->GetDicomDirStudyElements();
69 gdcmDicomDirStudy *st = new gdcmDicomDirStudy( ptagHT);
70 st->FillObject(elemList);
72 studies.push_front(st);
78 //-----------------------------------------------------------------------------
81 //-----------------------------------------------------------------------------
84 //-----------------------------------------------------------------------------