1 /*=========================================================================
4 Module: $RCSfile: gdcmDicomDirStudy.cxx,v $
6 Date: $Date: 2004/12/03 20:16:57 $
7 Version: $Revision: 1.20 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
19 #include "gdcmDicomDirStudy.h"
20 #include "gdcmDicomDirElement.h"
21 #include "gdcmGlobal.h"
22 #include "gdcmDicomDirSerie.h"
26 //-----------------------------------------------------------------------------
27 // Constructor / Destructor
29 * \ingroup DicomDirStudy
31 * @param ptagHT pointer to the HTable (DicomDirObject needs it
32 * to build the HeaderEntries)
34 DicomDirStudy::DicomDirStudy():
39 * \ingroup DicomDirStudy
40 * \brief Canonical destructor.
42 DicomDirStudy::~DicomDirStudy()
44 for(ListDicomDirSerie::iterator cc = Series.begin();
52 //-----------------------------------------------------------------------------
55 * \ingroup DicomDirStudy
56 * \brief Prints the Object
59 void DicomDirStudy::Print(std::ostream& os)
61 os << "STUDY" << std::endl;
62 DicomDirObject::Print(os);
64 for(ListDicomDirSerie::iterator cc = Series.begin();
68 (*cc)->SetPrintLevel(PrintLevel);
73 //-----------------------------------------------------------------------------
77 * \brief Writes the Object
80 void DicomDirStudy::WriteContent(std::ofstream* fp, FileType t)
82 DicomDirObject::WriteContent(fp, t);
84 for(ListDicomDirSerie::iterator cc = Series.begin();
88 (*cc)->WriteContent( fp, t );
93 * \ingroup DicomDirStudy
94 * \brief adds a new Serie at the begining of the SerieList
95 * of a partially created DICOMDIR
97 DicomDirSerie* DicomDirStudy::NewSerie()
99 ListDicomDirSerieElem const & elemList =
100 Global::GetDicomDirElements()->GetDicomDirSerieElements();
102 DicomDirSerie* st = new DicomDirSerie();
103 FillObject(elemList);
104 Series.push_front(st);
108 //-----------------------------------------------------------------------------
111 //-----------------------------------------------------------------------------
114 //-----------------------------------------------------------------------------
115 } // end namespace gdcm