Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

gdcmDicomDirMeta.cxx

Go to the documentation of this file.
00001 /*=========================================================================
00002                                                                                 
00003   Program:   gdcm
00004   Module:    $RCSfile: gdcmDicomDirMeta.cxx,v $
00005   Language:  C++
00006   Date:      $Date: 2005/02/01 10:29:55 $
00007   Version:   $Revision: 1.27 $
00008                                                                                 
00009   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
00010   l'Image). All rights reserved. See Doc/License.txt or
00011   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
00012                                                                                 
00013      This software is distributed WITHOUT ANY WARRANTY; without even
00014      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00015      PURPOSE.  See the above copyright notices for more information.
00016                                                                                 
00017 =========================================================================*/
00018 
00019 #include "gdcmDicomDirMeta.h"
00020 #include "gdcmDocument.h"
00021 #include "gdcmDocEntry.h"
00022 #include "gdcmGlobal.h"
00023 
00024 namespace gdcm 
00025 {
00026 //-----------------------------------------------------------------------------
00027 // Constructor / Destructor
00031 DicomDirMeta::DicomDirMeta(bool empty):
00032    DicomDirObject()
00033 {
00034    if( !empty )
00035    {
00036       ListDicomDirStudyElem const &elemList = 
00037          Global::GetDicomDirElements()->GetDicomDirMetaElements();
00038       FillObject(elemList);
00039    }
00040 }
00041 
00045 DicomDirMeta::~DicomDirMeta() 
00046 {
00047 }
00048 
00049 //-----------------------------------------------------------------------------
00050 // Public
00057 void DicomDirMeta::WriteContent(std::ofstream *fp, FileType filetype)
00058 {   
00059    for (ListDocEntry::iterator i = DocEntries.begin();  
00060                               i != DocEntries.end();
00061                               ++i)
00062    {
00063       (*i)->WriteContent(fp, filetype);
00064    }
00065 }
00066 
00067 //-----------------------------------------------------------------------------
00068 // Protected
00069 
00070 //-----------------------------------------------------------------------------
00071 // Private
00072 
00073 //-----------------------------------------------------------------------------
00074 // Print
00080 void DicomDirMeta::Print(std::ostream &os, std::string const & )
00081 {
00082    os << "META" << std::endl;
00083    // warning : META doesn't behave exactly like a Objet 
00084    for (ListDocEntry::iterator i = DocEntries.begin();
00085         i != DocEntries.end();
00086         ++i)
00087    {
00088       (*i)->SetPrintLevel(PrintLevel);
00089       (*i)->Print();
00090       os << std::endl;
00091    }
00092 }
00093 
00094 //-----------------------------------------------------------------------------
00095 } // end namespace gdcm

Generated on Thu Feb 10 22:17:56 2005 for gdcm by doxygen 1.3.6