#include <gdcmDictEntry.h>
Inheritance diagram for gdcm::DictEntry:
Public Member Functions | |
DictEntry (uint16_t group, uint16_t elem, TagName const &vr=GDCM_UNKNOWN, TagName const &vm=GDCM_UNKNOWN, TagName const &name=GDCM_UNKNOWN) | |
Constructor. | |
void | Print (std::ostream &os=std::cout, std::string const &indent="") |
Prints an entry of the Dicom DictionaryEntry. | |
void | SetVR (TagName const &vr) |
If-and only if-the V(alue) R(epresentation) \ is unset then overwrite it. | |
void | SetVM (TagName const &vm) |
If-and only if-the V(alue) M(ultiplicity) \ is unset then overwrite it. | |
bool | IsVRUnknown () |
tells if the V(alue) R(epresentation) is known (?!) | |
bool | IsVMUnknown () |
tells if the V(alue) M(ultiplicity) is known (?!) | |
uint16_t | GetGroup () |
Returns the Dicom Group Number of the current DictEntry. | |
uint16_t | GetElement () |
Returns the Dicom Element Number of the current DictEntry. | |
const TagName & | GetVR () const |
Returns the Dicom Value Representation of the current DictEntry. | |
void | SetKey (TagName const &k) |
sets the key of the current DictEntry | |
const TagName & | GetVM () const |
returns the VM field of the current DictEntry | |
const TagName & | GetName () const |
Returns the Dicom Name of the current DictEntry e.g. "Patient Name" for Dicom Tag (0x0010, 0x0010). | |
const TagName & | GetKey () const |
Gets the key of the current DictEntry. | |
void | SetPrintLevel (int level) |
Sets the print level for the Dicom Header Elements. | |
int | GetPrintLevel () |
Gets the print level for the Dicom Entries. | |
Static Public Member Functions | |
TagKey | TranslateToKey (uint16_t group, uint16_t elem) |
concatenates 2 uint16_t (supposed to be a Dicom group number and a Dicom element number) | |
Protected Attributes | |
int | PrintLevel |
Amount of printed details for each Dicom Entries : 0 : stands for the least detail level. | |
Private Attributes | |
uint16_t | Group |
DicomGroup number. | |
uint16_t | Element |
DicomElement number. | |
TagName | VR |
Value Representation i.e. some clue about the nature of the data represented e.g. "FD" short for "Floating Point Double"(see VR) "PN" short for "Person Name". | |
TagName | VM |
Value Multiplicity (e.g. "1", "1-n", "6"). | |
TagName | Name |
e.g. "Patient's Name" | |
TagKey | Key |
Redundant with (group, elem) but we add it for efficiency purpose. |
Definition at line 39 of file gdcmDictEntry.h.
|
Constructor.
Definition at line 39 of file gdcmDictEntry.cxx. References Key, Name, gdcm::TagName, TranslateToKey(), and VM.
|
|
Returns the Dicom Element Number of the current DictEntry.
Definition at line 69 of file gdcmDictEntry.h. Referenced by Print(), and gdcm::DocEntryArchive::Push().
00069 { return Element; } |
|
Returns the Dicom Group Number of the current DictEntry.
Definition at line 65 of file gdcmDictEntry.h. Referenced by Print(), and gdcm::DocEntryArchive::Push().
00065 { return Group; } |
|
Gets the key of the current DictEntry.
Definition at line 91 of file gdcmDictEntry.h. References gdcm::TagName. Referenced by gdcm::Dict::AddEntry(), and gdcm::Dict::ReplaceEntry().
00091 { return Key; } |
|
Returns the Dicom Name of the current DictEntry e.g. "Patient Name" for Dicom Tag (0x0010, 0x0010).
Definition at line 87 of file gdcmDictEntry.h. References gdcm::TagName. Referenced by gdcm::DocEntrySet::GetDictEntry(), and Print().
00087 { return Name; } |
|
Gets the print level for the Dicom Entries.
Definition at line 48 of file gdcmBase.h.
00048 { return PrintLevel; }; |
|
returns the VM field of the current DictEntry
Definition at line 82 of file gdcmDictEntry.h. References gdcm::TagName.
00082 { return VM; } |
|
Returns the Dicom Value Representation of the current DictEntry.
Definition at line 74 of file gdcmDictEntry.h. References gdcm::TagName. Referenced by gdcm::DocEntrySet::GetDictEntry(), Print(), and gdcm::Document::ReadNextDocEntry().
00074 { return VR; } |
|
tells if the V(alue) M(ultiplicity) is known (?!)
Definition at line 61 of file gdcmDictEntry.h. References gdcm::GDCM_UNKNOWN. Referenced by SetVM().
00061 { return VM == GDCM_UNKNOWN; } |
|
tells if the V(alue) R(epresentation) is known (?!)
Definition at line 57 of file gdcmDictEntry.h. References gdcm::GDCM_UNKNOWN. Referenced by SetVR().
00057 { return VR == GDCM_UNKNOWN; } |
|
Prints an entry of the Dicom DictionaryEntry.
Reimplemented from gdcm::Base. Definition at line 113 of file gdcmDictEntry.cxx. References gdcm::GDCM_UNKNOWN, GetElement(), GetGroup(), GetName(), and GetVR().
00114 { 00115 std::string vr; 00116 std::ostringstream s; 00117 00118 vr = GetVR(); 00119 if(vr==GDCM_UNKNOWN) 00120 vr=" "; 00121 00122 s << DictEntry::TranslateToKey(GetGroup(),GetElement()); 00123 s << " [" << vr << "] "; 00124 00125 if (PrintLevel >= 1) 00126 { 00127 s.setf(std::ios::left); 00128 s << std::setw(66-GetName().length()) << " "; 00129 } 00130 00131 s << "[" << GetName()<< "]"; 00132 os << s.str() << std::endl; 00133 } |
|
sets the key of the current DictEntry
Definition at line 78 of file gdcmDictEntry.h. References gdcm::TagName.
00078 { Key = k; } |
|
Sets the print level for the Dicom Header Elements.
Definition at line 45 of file gdcmBase.h. Referenced by gdcm::SQItem::Print(), gdcm::SeqEntry::Print(), gdcm::FileHelper::Print(), gdcm::ElementSet::Print(), and gdcm::DicomDir::Print().
00045 { PrintLevel = level; }; |
|
If-and only if-the V(alue) M(ultiplicity) \ is unset then overwrite it.
Definition at line 76 of file gdcmDictEntry.cxx. References gdcmErrorMacro, IsVMUnknown(), gdcm::TagName, and VM.
00077 { 00078 if ( IsVMUnknown() ) 00079 { 00080 VM = vm; 00081 } 00082 else 00083 { 00084 gdcmErrorMacro( "Overwriting VM might compromise a dictionary"); 00085 } 00086 } |
|
If-and only if-the V(alue) R(epresentation) \ is unset then overwrite it.
Definition at line 59 of file gdcmDictEntry.cxx. References gdcmErrorMacro, IsVRUnknown(), and gdcm::TagName.
00060 { 00061 if ( IsVRUnknown() ) 00062 { 00063 VR = vr; 00064 } 00065 else 00066 { 00067 gdcmErrorMacro( "Overwriting VR might compromise a dictionary"); 00068 } 00069 } |
|
concatenates 2 uint16_t (supposed to be a Dicom group number and a Dicom element number)
Definition at line 95 of file gdcmDictEntry.cxx. References gdcm::TagKey. Referenced by DictEntry().
00096 { 00097 return Util::Format("%04x|%04x", group, elem); 00098 } |
|
DicomElement number.
Definition at line 109 of file gdcmDictEntry.h. |
|
DicomGroup number.
Definition at line 106 of file gdcmDictEntry.h. |
|
Redundant with (group, elem) but we add it for efficiency purpose.
Definition at line 172 of file gdcmDictEntry.h. Referenced by DictEntry(). |
|
e.g. "Patient's Name"
Definition at line 169 of file gdcmDictEntry.h. Referenced by DictEntry(). |
|
Amount of printed details for each Dicom Entries : 0 : stands for the least detail level.
Definition at line 53 of file gdcmBase.h. Referenced by gdcm::Base::Base(). |
|
Value Multiplicity (e.g. "1", "1-n", "6").
Definition at line 166 of file gdcmDictEntry.h. Referenced by DictEntry(), and SetVM(). |
|
Value Representation i.e. some clue about the nature of the data represented e.g. "FD" short for "Floating Point Double"(see VR) "PN" short for "Person Name".
Definition at line 115 of file gdcmDictEntry.h. |