]> Creatis software - gdcm.git/blobdiff - src/gdcmDicomDirSerie.cxx
* Add the Copy method in all datas
[gdcm.git] / src / gdcmDicomDirSerie.cxx
index 090dac646c530056d5274e317a7289760e887254..3737076e424ff7095a846e7e862ccfaca099a14f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirSerie.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/25 14:52:33 $
-  Version:   $Revision: 1.39 $
+  Date:      $Date: 2005/11/29 12:48:46 $
+  Version:   $Revision: 1.40 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -120,6 +120,27 @@ DicomDirImage *DicomDirSerie::GetNextImage()
    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 DicomDirSerie::Copy(DocEntrySet *set)
+{
+   // Remove all previous childs
+   ClearImage();
+
+   DicomDirObject::Copy(set);
+
+   DicomDirSerie *ddEntry = dynamic_cast<DicomDirSerie *>(set);
+   if( ddEntry )
+   {
+      Images = ddEntry->Images;
+      for(ItImage = Images.begin();ItImage != Images.end();++ItImage)
+         (*ItImage)->Register();
+   }
+}
+
 //-----------------------------------------------------------------------------
 // Protected