00001 /*========================================================================= 00002 00003 Program: gdcm 00004 Module: $RCSfile: gdcmDicomDirPrivate.cxx,v $ 00005 Language: C++ 00006 Date: $Date: 2007/05/23 14:18:08 $ 00007 Version: $Revision: 1.2 $ 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 "gdcmDicomDirPrivate.h" 00020 #include "gdcmGlobal.h" 00021 #include "gdcmDataEntry.h" 00022 00023 namespace GDCM_NAME_SPACE 00024 { 00025 //----------------------------------------------------------------------------- 00026 // Constructor / Destructor 00031 DicomDirPrivate::DicomDirPrivate(bool empty): 00032 DicomDirObject() 00033 { 00034 if ( !empty ) 00035 { 00036 ListDicomDirPrivateElem const &elemList = 00037 Global::GetDicomDirElements()->GetDicomDirPrivateElements(); 00038 FillObject(elemList); 00039 } 00040 } 00041 00045 DicomDirPrivate::~DicomDirPrivate() 00046 { 00047 } 00048 00049 //----------------------------------------------------------------------------- 00050 // Public 00051 00052 //----------------------------------------------------------------------------- 00053 // Protected 00054 00055 //----------------------------------------------------------------------------- 00056 // Private 00057 00058 //----------------------------------------------------------------------------- 00059 // Print 00066 void DicomDirPrivate::Print(std::ostream &os, std::string const & ) 00067 { 00068 os << "PRIVATE : "; 00069 for(ListDocEntry::iterator i = DocEntries.begin(); 00070 i!= DocEntries.end(); 00071 ++i) 00072 { 00073 if ( (*i)->GetGroup() == 0x0004 && (*i)->GetElement() == 0x1500 ) 00074 { 00075 if( dynamic_cast<DataEntry *>(*i) ) 00076 os << (dynamic_cast<DataEntry *>(*i))->GetString(); 00077 } 00078 } 00079 os << std::endl; 00080 00081 DicomDirObject::Print(os); 00082 } 00083 00084 //----------------------------------------------------------------------------- 00085 } // end namespace gdcm 00086