1 /*=========================================================================
4 Module: $RCSfile: gdcmDicomDirMeta.cxx,v $
6 Date: $Date: 2005/01/24 16:10:52 $
7 Version: $Revision: 1.26 $
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"
27 //-----------------------------------------------------------------------------
28 // Constructor / Destructor
33 DicomDirMeta::DicomDirMeta(bool empty):
38 ListDicomDirStudyElem const &elemList =
39 Global::GetDicomDirElements()->GetDicomDirMetaElements();
45 * \brief Canonical destructor.
47 DicomDirMeta::~DicomDirMeta()
51 //-----------------------------------------------------------------------------
54 * \brief Prints the Meta Elements
55 * @param os ostream to write to
56 * @param indent Indentation string to be prepended during printing
58 void DicomDirMeta::Print(std::ostream &os, std::string const & )
60 os << "META" << std::endl;
61 // warning : META doesn't behave exactly like a Objet
62 for (ListDocEntry::iterator i = DocEntries.begin();
63 i != DocEntries.end();
66 (*i)->SetPrintLevel(PrintLevel);
73 //-----------------------------------------------------------------------------
78 * \brief Writes the Meta Elements
79 * @param fp ofstream to write to
80 * @param filetype type of the file (ACR, ImplicitVR, ExplicitVR, ...)
83 void DicomDirMeta::WriteContent(std::ofstream *fp, FileType filetype)
85 for (ListDocEntry::iterator i = DocEntries.begin();
86 i != DocEntries.end();
89 (*i)->WriteContent(fp, filetype);
93 //-----------------------------------------------------------------------------
96 //-----------------------------------------------------------------------------
99 //-----------------------------------------------------------------------------
100 } // end namespace gdcm