00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _GDCMCOMMON_H_
00020 #define _GDCMCOMMON_H_
00021
00022 #include "gdcmConfigure.h"
00023 #include "gdcmSystem.h"
00024 #include "gdcmMacro.h"
00025 #include "gdcmVRKey.h"
00026 #include <string>
00027
00028
00029 #if defined(_WIN32) && defined(BUILD_SHARED_LIBS)
00030 #ifdef gdcm_EXPORTS
00031 #define GDCM_EXPORT __declspec( dllexport )
00032 #else
00033 #define GDCM_EXPORT __declspec( dllimport )
00034 #endif
00035 #else
00036 #define GDCM_EXPORT
00037 #endif
00038
00039 #ifdef __BORLANDC__
00040 #include <mem.h>
00041 #endif
00042
00043
00045 namespace GDCM_NAME_SPACE
00046 {
00047
00048
00049
00050
00051
00052
00053
00054
00055 #ifndef PUB_DICT_PATH
00056 # define PUB_DICT_PATH "../Dicts/"
00057 #endif
00058 #define PUB_DICT_NAME "dicomV3Dict"
00059
00060
00061
00062
00063 #define PUB_DICT_FILENAME "gdcm.dic"
00064 #define DICT_ELEM "DicomDir.dic"
00065 #define DICT_TS "dicomTS.dic"
00066 #define DICT_VR "dicomVR.dic"
00067 #define DICT_GROUP_NAME "DictGroupName.dic"
00068
00069 GDCM_EXPORT extern const std::string GDCM_UNKNOWN;
00070 GDCM_EXPORT extern const std::string GDCM_UNFOUND;
00071 GDCM_EXPORT extern const std::string GDCM_BINLOADED;
00072 GDCM_EXPORT extern const std::string GDCM_NOTLOADED;
00073 GDCM_EXPORT extern const std::string GDCM_UNREAD;
00074 GDCM_EXPORT extern const std::string GDCM_NOTASCII;
00075 GDCM_EXPORT extern const std::string GDCM_PIXELDATA;
00076
00077 GDCM_EXPORT extern const char GDCM_VRUNKNOWN[2];
00078
00079 GDCM_EXPORT extern const char GDCM_FILESEPARATOR;
00080
00088
00089 #if defined(_MSC_VER) && (_MSC_VER == 1200)
00090
00091 inline std::ostream& operator<<(std::ostream& _O, std::string _val)
00092 {
00093 return _O << _val.c_str();
00094 }
00095 #endif
00096
00099 typedef std::string TagName;
00100
00102 enum FileType {
00103
00104 Unknown = 0,
00105 ExplicitVR,
00106 ImplicitVR,
00107 ACR,
00108 ACR_LIBIDO,
00111 JPEG,
00112 JPEG2000
00113 };
00114
00116 enum DicomDirType {
00117 DD_UNKNOWN = 0,
00118 DD_META,
00119 DD_PATIENT,
00120 DD_STUDY,
00121 DD_SERIE,
00122 DD_IMAGE,
00123 DD_VISIT
00124 };
00125
00127 enum CompOperators {
00128 GDCM_EQUAL = 0,
00129 GDCM_DIFFERENT,
00130 GDCM_GREATER,
00131 GDCM_GREATEROREQUAL,
00132 GDCM_LESS,
00133 GDCM_LESSOREQUAL
00134 };
00135
00137 enum LodModeType
00138 {
00139 LD_ALL = 0x00000000,
00140 LD_NOSEQ = 0x00000001,
00141 LD_NOSHADOW = 0x00000002,
00142 LD_NOSHADOWSEQ = 0x00000004
00143
00144
00145 };
00146
00157 enum ImageContentType
00158 {
00159
00160 USER_OWN_IMAGE = 1,
00161 FILTERED_IMAGE,
00162 CREATED_IMAGE,
00163 UNMODIFIED_PIXELS_IMAGE
00164 };
00165
00169 struct DicomElement
00170 {
00172 unsigned short int Group;
00174 unsigned short int Elem;
00176 VRKey VR;
00178 std::string Value;
00179 };
00180
00181 }
00182
00183 #endif