X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDicomDirPatient.cxx;h=616d182c4c4c72f90b22c6bc40a7eb068573e305;hb=7dc67f3f6c048f30c66765c15710ceaa82f228e9;hp=73680f8051df592defd78eac10bae7c8e14198f7;hpb=6b51b22366f878e1050c75a6ebb755bd2ff365c7;p=gdcm.git diff --git a/src/gdcmDicomDirPatient.cxx b/src/gdcmDicomDirPatient.cxx index 73680f80..616d182c 100644 --- a/src/gdcmDicomDirPatient.cxx +++ b/src/gdcmDicomDirPatient.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirPatient.cxx,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:33 $ - Version: $Revision: 1.39 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.41 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -23,7 +23,7 @@ #include "gdcmSQItem.h" #include "gdcmDebug.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor @@ -136,6 +136,27 @@ DicomDirStudy *DicomDirPatient::GetLastStudy() return NULL; } +/** + * \brief Copies all the attributes from an other DocEntrySet + * @param set entry to copy from + * @remarks The contained DocEntries a not copied, only referenced + */ +void DicomDirPatient::Copy(DocEntrySet *set) +{ + // Remove all previous childs + ClearStudy(); + + DicomDirObject::Copy(set); + + DicomDirPatient *ddEntry = dynamic_cast(set); + if( ddEntry ) + { + Studies = ddEntry->Studies; + for(ItStudy = Studies.begin();ItStudy != Studies.end();++ItStudy) + (*ItStudy)->Register(); + } +} + //----------------------------------------------------------------------------- // Protected