1 /*=========================================================================
4 Module: $RCSfile: gdcmDicomDirMeta.cxx,v $
6 Date: $Date: 2005/06/24 10:55:58 $
7 Version: $Revision: 1.28 $
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 "gdcmDicomDirMeta.h"
20 #include "gdcmDocument.h"
21 #include "gdcmDocEntry.h"
22 #include "gdcmGlobal.h"
26 //-----------------------------------------------------------------------------
27 // Constructor / Destructor
31 DicomDirMeta::DicomDirMeta(bool empty):
36 ListDicomDirStudyElem const &elemList =
37 Global::GetDicomDirElements()->GetDicomDirMetaElements();
43 * \brief Canonical destructor.
45 DicomDirMeta::~DicomDirMeta()
49 //-----------------------------------------------------------------------------
52 * \brief Writes the Meta Elements
53 * @param fp ofstream to write to
54 * @param filetype type of the file (ACR, ImplicitVR, ExplicitVR, ...)
57 void DicomDirMeta::WriteContent(std::ofstream *fp, FileType filetype)
59 for (ListDocEntry::iterator i = DocEntries.begin();
60 i != DocEntries.end();
63 (*i)->WriteContent(fp, filetype);
67 //-----------------------------------------------------------------------------
70 //-----------------------------------------------------------------------------
73 //-----------------------------------------------------------------------------
76 * \brief Prints the Meta Elements
77 * @param os ostream to write to
78 * @param indent Indentation string to be prepended during printing
80 void DicomDirMeta::Print(std::ostream &os, std::string const & )
82 os << "META" << std::endl;
83 // warning : META doesn't behave exactly like a Objet
84 for (ListDocEntry::iterator i = DocEntries.begin();
85 i != DocEntries.end();
88 (*i)->SetPrintLevel(PrintLevel);
94 //-----------------------------------------------------------------------------
95 } // end namespace gdcm