X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDicomDirStudy.cxx;h=5e34175cd02c3c1a27c297c3ff31b399dc44b62b;hb=add6c88b334e9cf4ddb0ae1849f1380f9844f99c;hp=b907e6983291b013b170765d75ebbe942ac62186;hpb=6b51b22366f878e1050c75a6ebb755bd2ff365c7;p=gdcm.git diff --git a/src/gdcmDicomDirStudy.cxx b/src/gdcmDicomDirStudy.cxx index b907e698..5e34175c 100644 --- a/src/gdcmDicomDirStudy.cxx +++ b/src/gdcmDicomDirStudy.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirStudy.cxx,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:33 $ - Version: $Revision: 1.41 $ + Date: $Date: 2007/10/08 15:20:17 $ + Version: $Revision: 1.46 $ 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 "gdcmDicomDirVisit.h" #include "gdcmDebug.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor @@ -58,22 +58,22 @@ DicomDirStudy::~DicomDirStudy() * @param t Type of the File (explicit VR, implicitVR, ...) * @return */ -void DicomDirStudy::WriteContent(std::ofstream *fp, FileType t) +void DicomDirStudy::WriteContent(std::ofstream *fp, FileType t, bool , bool ) { - DicomDirObject::WriteContent(fp, t); + DicomDirObject::WriteContent(fp, t, false, true); for(ListDicomDirSerie::iterator cc = Series.begin(); cc!= Series.end(); ++cc ) { - (*cc)->WriteContent( fp, t ); + (*cc)->WriteContent( fp, t, false, true ); } for(ListDicomDirVisit::iterator icc = Visits.begin(); icc!= Visits.end(); ++icc ) { - (*icc)->WriteContent( fp, t ); + (*icc)->WriteContent( fp, t, false, true ); } } @@ -213,6 +213,32 @@ DicomDirVisit *DicomDirStudy::GetLastVisit() 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 DicomDirStudy::Copy(DocEntrySet *set) +{ + // Remove all previous childs + ClearSerie(); + ClearVisit(); + + DicomDirObject::Copy(set); + + DicomDirStudy *ddEntry = dynamic_cast(set); + if( ddEntry ) + { + Series = ddEntry->Series; + for(ItSerie = Series.begin();ItSerie != Series.end();++ItSerie) + (*ItSerie)->Register(); + + Visits = ddEntry->Visits; + for(ItVisit = Visits.begin();ItVisit != Visits.end();++ItVisit) + (*ItVisit)->Register(); + } +} + //----------------------------------------------------------------------------- // Protected