1 /*=========================================================================
4 Module: $RCSfile: gdcmDicomDirMeta.cxx,v $
6 Date: $Date: 2005/11/03 11:08:18 $
7 Version: $Revision: 1.29 $
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"
23 #include "gdcmDataEntry.h"
26 //-----------------------------------------------------------------------------
27 // Constructor / Destructor
31 DicomDirMeta::DicomDirMeta(bool empty):
36 uint8_t fmiv[2] = {0x02,0x00};
37 ListDicomDirStudyElem const &elemList =
38 Global::GetDicomDirElements()->GetDicomDirMetaElements();
41 SetEntryBinArea(fmiv, 0x0002,0x0001, 2);
47 * \brief Canonical destructor.
49 DicomDirMeta::~DicomDirMeta()
53 //-----------------------------------------------------------------------------
56 * \brief Writes the Meta Elements
57 * @param fp ofstream to write to
58 * @param filetype type of the file (ACR, ImplicitVR, ExplicitVR, ...)
61 void DicomDirMeta::WriteContent(std::ofstream *fp, FileType filetype)
63 for (ListDocEntry::iterator i = DocEntries.begin();
64 i != DocEntries.end();
67 (*i)->WriteContent(fp, filetype);
71 //-----------------------------------------------------------------------------
74 //-----------------------------------------------------------------------------
77 //-----------------------------------------------------------------------------
80 * \brief Prints the Meta Elements
81 * @param os ostream to write to
82 * @param indent Indentation string to be prepended during printing
84 void DicomDirMeta::Print(std::ostream &os, std::string const & )
86 os << "META" << std::endl;
87 // warning : META doesn't behave exactly like a Objet
88 for (ListDocEntry::iterator i = DocEntries.begin();
89 i != DocEntries.end();
92 (*i)->SetPrintLevel(PrintLevel);
98 //-----------------------------------------------------------------------------
99 } // end namespace gdcm