1 /*=========================================================================
4 Module: $RCSfile: gdcmDicomDirSerie.cxx,v $
6 Date: $Date: 2004/12/03 17:13:18 $
7 Version: $Revision: 1.22 $
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 "gdcmDicomDirSerie.h"
20 #include "gdcmDicomDirElement.h"
21 #include "gdcmGlobal.h"
26 //-----------------------------------------------------------------------------
27 // Constructor / Destructor
30 * @param ptagHT pointer to the HTable (DicomDirObject needs it
31 * to build the DocEntries)
33 DicomDirSerie::DicomDirSerie():
38 * \brief Canonical destructor.
40 DicomDirSerie::~DicomDirSerie()
42 for(ListDicomDirImage::iterator cc = Images.begin();
50 //-----------------------------------------------------------------------------
53 * \brief Prints the Object
56 void DicomDirSerie::Print(std::ostream& os)
58 os << "SERIE" << std::endl;
59 DicomDirObject::Print(os);
61 for(ListDicomDirImage::iterator cc = Images.begin();
65 (*cc)->SetPrintLevel(PrintLevel);
70 //-----------------------------------------------------------------------------
74 * \brief Writes the Object
77 void DicomDirSerie::WriteContent(std::ofstream* fp, FileType t)
79 DicomDirObject::WriteContent(fp, t);
81 for(ListDicomDirImage::iterator cc = Images.begin();
85 (*cc)->WriteContent( fp, t );
90 * \brief adds a new Image (with the basic elements) to a partially created DICOMDIR
92 DicomDirImage* DicomDirSerie::NewImage()
94 ListDicomDirImageElem const & elemList =
95 Global::GetDicomDirElements()->GetDicomDirImageElements();
97 DicomDirImage* st = new DicomDirImage();
99 Images.push_front(st);
103 //-----------------------------------------------------------------------------
106 //-----------------------------------------------------------------------------
109 //-----------------------------------------------------------------------------
110 } // end namespace gdcm