X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDictEntry.cxx;h=7699a4a872272c3a8743ef76f640932cf0460510;hb=831b4cec23815614ee2ceddff957e852d7a36fe9;hp=886dd48912aa37898cb6854c3471e91d4ffe4d53;hpb=7059f7f1ad9d1466d7b752a40cfeb95ba81aa3d8;p=gdcm.git diff --git a/src/gdcmDictEntry.cxx b/src/gdcmDictEntry.cxx index 886dd489..7699a4a8 100644 --- a/src/gdcmDictEntry.cxx +++ b/src/gdcmDictEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDictEntry.cxx,v $ Language: C++ - Date: $Date: 2005/01/10 17:17:52 $ - Version: $Revision: 1.38 $ + Date: $Date: 2005/01/16 04:50:41 $ + Version: $Revision: 1.41 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -20,6 +20,9 @@ #include "gdcmDebug.h" #include "gdcmUtil.h" +#include // for std::ios::left, ... +#include + namespace gdcm { @@ -49,6 +52,27 @@ DictEntry::DictEntry(uint16_t group, uint16_t element, //----------------------------------------------------------------------------- // Print +void DictEntry::Print(std::ostream &os, std::string const & ) +{ + std::string vr; + std::ostringstream s; + + vr = GetVR(); + if(vr==GDCM_UNKNOWN) + vr=" "; + + s << DictEntry::TranslateToKey(GetGroup(),GetElement()); + s << " [" << vr << "] "; + + if (PrintLevel >= 1) + { + s.setf(std::ios::left); + s << std::setw(66-GetName().length()) << " "; + } + + s << "[" << GetName()<< "]"; + os << s.str() << std::endl; +} //----------------------------------------------------------------------------- // Public