1 /*=========================================================================
4 Module: $RCSfile: gdcmDicomDirSerie.cxx,v $
6 Date: $Date: 2005/01/06 20:03:27 $
7 Version: $Revision: 1.25 $
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 "gdcmDicomDirImage.h"
22 #include "gdcmGlobal.h"
27 //-----------------------------------------------------------------------------
28 // Constructor / Destructor
32 DicomDirSerie::DicomDirSerie():
37 * \brief Canonical destructor.
39 DicomDirSerie::~DicomDirSerie()
41 for(ListDicomDirImage::iterator cc = Images.begin();
49 //-----------------------------------------------------------------------------
52 * \brief Prints the Object
53 * @param os ostream to write to
55 void DicomDirSerie::Print(std::ostream &os)
57 os << "SERIE" << std::endl;
58 DicomDirObject::Print(os);
60 for(ListDicomDirImage::iterator cc = Images.begin();
64 (*cc)->SetPrintLevel(PrintLevel);
69 //-----------------------------------------------------------------------------
73 * \brief Writes the Object
74 * @param fp ofstream to write to
75 * @param t Type of the File (explicit VR, implicitVR, ...)
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