X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDicomDirPatient.cxx;h=2859349ea1fc050c94b8fb2c70512dd71fbc6f5c;hb=9b3db5f141ec2b11eadefaa2ea2a3a20058b37f9;hp=007eeaf0f9a53d6fa969cfcff265032cdaa9f4bf;hpb=22f785a2627d1e7823701193bd7624739a3e033b;p=gdcm.git diff --git a/src/gdcmDicomDirPatient.cxx b/src/gdcmDicomDirPatient.cxx index 007eeaf0..2859349e 100644 --- a/src/gdcmDicomDirPatient.cxx +++ b/src/gdcmDicomDirPatient.cxx @@ -1,17 +1,29 @@ // gdcmDicomDirPatient.cxx //----------------------------------------------------------------------------- #include "gdcmDicomDirPatient.h" - +#include "gdcmDicomDirElement.h" +#include "gdcmUtil.h" //----------------------------------------------------------------------------- // Constructor / Destructor /** * \ingroup gdcmDicomDirPatient - * \brief - * @param begin iterator of begin for the object - * @param end iterator of end for the object + * \brief Constructor + * @param begin iterator (inside the gdcmParser chained list) + * on the first Header Entry (i.e Dicom Element) + * related to this "PATIENT" part + * @param end iterator (inside the gdcmParser chained list) + * on the last Header Entry (i.e Dicom Element) + * related to this 'PATIENT' part + * @param ptagHT pointer to the HTable (gdcmObject needs it + * to build the gdcmHeaderEntries) + * @param plistEntries pointer to the chained List (gdcmObject needs it + * to build the gdcmHeaderEntries) */ -gdcmDicomDirPatient::gdcmDicomDirPatient(ListTag::iterator begin,ListTag::iterator end): - gdcmObject(begin,end) +gdcmDicomDirPatient::gdcmDicomDirPatient(ListTag::iterator begin, + ListTag::iterator end, + TagHeaderEntryHT *ptagHT, + ListTag *plistEntries): + gdcmObject(begin,end,ptagHT,plistEntries) { } @@ -49,6 +61,23 @@ void gdcmDicomDirPatient::Print(std::ostream &os) //----------------------------------------------------------------------------- // Public +/* + * \ingroup gdcmDicomDir + * \brief adds a new Patient at the begining of the PatientList + * of a partially created DICOMDIR + */ +gdcmDicomDirStudy * gdcmDicomDirPatient::NewStudy(void) { + std::list elemList; + elemList=gdcmGlobal::GetDicomDirElements()->GetDicomDirStudyElements(); + + FillObject(elemList); + gdcmDicomDirStudy *st = new gdcmDicomDirStudy(i, j, ptagHT, plistEntries); + studies.push_front(st); + return st; + + +} + //----------------------------------------------------------------------------- // Protected