00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "gdcmDictEntry.h"
00020 #include "gdcmDebug.h"
00021 #include "gdcmUtil.h"
00022
00023 #include <iomanip>
00024 #include <fstream>
00025 #include <stdio.h>
00026
00027 namespace gdcm
00028 {
00029
00030
00039 DictEntry::DictEntry(uint16_t group, uint16_t elem,
00040 VRKey const &vr,
00041 TagName const &vm,
00042 TagName const &name)
00043
00044 {
00045 Tag.SetGroup(group);
00046 Tag.SetElement(elem);
00047 VR = vr;
00048 VM = vm;
00049 Name = name;
00050 }
00051
00055 DictEntry::~DictEntry()
00056 {
00057 }
00058
00059
00068 DictEntry *DictEntry::New(uint16_t group, uint16_t elem,
00069 VRKey const &vr,
00070 TagName const &vm,
00071 TagName const &name)
00072 {
00073 return new DictEntry(group,elem,vr,vm,name);
00074 }
00075
00083 TagKey DictEntry::TranslateToKey(uint16_t group, uint16_t elem)
00084 {
00085
00086
00087
00088 return TagKey(group,elem);
00089 }
00090
00091
00092
00093
00094
00095
00096
00097
00098
00104 void DictEntry::Print(std::ostream &os, std::string const & )
00105 {
00106 os << GetKey();
00107 os << " [" << VR << "] ";
00108
00109 std::ostringstream s;
00110
00111 if ( PrintLevel >= 1 )
00112 {
00113 s.setf(std::ios::left);
00114 s << std::setw(66-GetName().length()) << " ";
00115 }
00116
00117 s << "[" << GetName()<< "]";
00118 os << s.str() << std::endl;
00119 }
00120
00121
00122 }
00123