00001 /*========================================================================= 00002 00003 Program: gdcm 00004 Module: $RCSfile: gdcmDictEntry.h,v $ 00005 Language: C++ 00006 Date: $Date: 2005/02/02 15:07:41 $ 00007 Version: $Revision: 1.34 $ 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 #ifndef GDCMDICTENTRY_H 00020 #define GDCMDICTENTRY_H 00021 00022 #include "gdcmBase.h" 00023 00024 namespace gdcm 00025 { 00026 00027 //----------------------------------------------------------------------------- 00039 class GDCM_EXPORT DictEntry : public Base 00040 { 00041 public: 00042 DictEntry(uint16_t group, 00043 uint16_t elem, 00044 TagName const &vr = GDCM_UNKNOWN, 00045 TagName const &vm = GDCM_UNKNOWN, 00046 TagName const &name = GDCM_UNKNOWN); 00047 00048 // Print 00049 void Print(std::ostream &os = std::cout, std::string const &indent = ""); 00050 00051 // Content of DictEntry 00052 void SetVR(TagName const &vr); 00053 void SetVM(TagName const &vm); 00054 00057 bool IsVRUnknown() { return VR == GDCM_UNKNOWN; } 00058 00061 bool IsVMUnknown() { return VM == GDCM_UNKNOWN; } 00062 00065 uint16_t GetGroup() { return Group; } 00066 00069 uint16_t GetElement() { return Element; } 00070 00074 const TagName &GetVR() const { return VR; } 00075 00078 void SetKey(TagName const &k) { Key = k; } 00079 00082 const TagName &GetVM() const { return VM; } 00083 00087 const TagName &GetName() const { return Name; } 00088 00091 const TagName &GetKey() const { return Key; } 00092 00093 // Key creation 00094 static TagKey TranslateToKey(uint16_t group, uint16_t elem); 00095 00096 private: 00104 00106 uint16_t Group; // e.g. 0x0010 00107 00109 uint16_t Element; // e.g. 0x0103 00110 00115 TagName VR; 00116 00117 /* 00118 * . 00119 * Formerly 'Group name abbreviations' 00120 * Here is a small dictionary we encountered in "nature": 00121 * - CMD Command 00122 * - META Meta Information 00123 * - DIR Directory 00124 * - ID ??? 00125 * - PAT Patient 00126 * - ACQ Acquisition 00127 * - REL Related 00128 * - IMG Image 00129 * - SDY Study 00130 * - VIS Visit 00131 * - WAV Waveform 00132 * - PRC ??? 00133 * - DEV Device 00134 * - NMI Nuclear Medicine 00135 * - MED ??? 00136 * - BFS Basic Film Session 00137 * - BFB Basic Film Box 00138 * - BIB Basic Image Box 00139 * - BAB 00140 * - IOB 00141 * - PJ 00142 * - PRINTER 00143 * - RT Radio Therapy 00144 * - DVH 00145 * - SSET 00146 * - RES Results 00147 * - CRV Curve 00148 * - OLY Overlays 00149 * - PXL Pixels 00150 * - DL Delimiters 00151 * . 00152 * 00153 * Other usefull abreviations used for Radiographic view associated with 00154 * Patient Position (0018,5100): 00155 * - AP = Anterior/Posterior 00156 * - PA = Posterior/Anterior 00157 * - LL = Left Lateral 00158 * - RL = Right Lateral 00159 * - RLD = Right Lateral Decubitus 00160 * - LLD = Left Lateral Decubitus 00161 * - RLO = Right Lateral Oblique 00162 * - LLO = Left Lateral Oblique 00163 * . 00164 */ 00166 TagName VM; 00167 00169 TagName Name; 00170 00172 TagKey Key; 00173 }; 00174 } // end namespace gdcm 00175 //----------------------------------------------------------------------------- 00176 #endif