]> Creatis software - gdcm.git/blobdiff - src/gdcmDicomDirStudy.cxx
* src/gdcmDicomDirObject.h : set the FillObject method in protected.
[gdcm.git] / src / gdcmDicomDirStudy.cxx
index 3a552627ab61b00c08d27a445a89329094ce9f74..6c43c6b01dec6eab9b6bcb8a72e49dac36a2e2b4 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirStudy.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 11:09:23 $
-  Version:   $Revision: 1.28 $
+  Date:      $Date: 2005/01/20 16:16:42 $
+  Version:   $Revision: 1.29 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -29,10 +29,17 @@ namespace gdcm
 /**
  * \brief  Constructor 
  */
-DicomDirStudy::DicomDirStudy():
+DicomDirStudy::DicomDirStudy(bool empty):
    DicomDirObject()
 {
+   if( !empty )
+   {
+      ListDicomDirStudyElem const &elemList = 
+         Global::GetDicomDirElements()->GetDicomDirStudyElements();
+      FillObject(elemList);
+   }
 }
+
 /**
  * \brief   Canonical destructor.
  */
@@ -94,12 +101,7 @@ void DicomDirStudy::WriteContent(std::ofstream *fp, FileType t)
  */
 DicomDirSerie *DicomDirStudy::NewSerie()
 {
-   ListDicomDirSerieElem const &elemList = 
-      Global::GetDicomDirElements()->GetDicomDirSerieElements();   
-
    DicomDirSerie* st = new DicomDirSerie();
-   st->FillObject(elemList);
-
    Series.push_back(st);
    return st;
 }