Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

gdcmCommon.h

Go to the documentation of this file.
00001 /*=========================================================================
00002                                                                                 
00003   Program:   gdcm
00004   Module:    $RCSfile: gdcmCommon.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/02/07 19:17:27 $
00007   Version:   $Revision: 1.61 $
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 GDCMCOMMON_H
00020 #define GDCMCOMMON_H
00021 
00022 #include "gdcmConfigure.h"
00023 
00024 //-----------------------------------------------------------------------------
00025 //This is needed when compiling in debug mode
00026 #ifdef _MSC_VER
00027 // 'identifier' : class 'type' needs to have dll-interface to be used by
00028 // clients of class 'type2'
00029 #pragma warning ( disable : 4251 )
00030 // non dll-interface class 'type' used as base for dll-interface class 'type2'
00031 #pragma warning ( disable : 4275 )
00032 // 'identifier' : identifier was truncated to 'number' characters in the
00033 // debug information
00034 #pragma warning ( disable : 4786 )
00035 //'identifier' : decorated name length exceeded, name was truncated
00036 #pragma warning ( disable : 4503 )
00037 // C++ exception specification ignored except to indicate a 
00038 // function is not __declspec(nothrow)
00039 #pragma warning ( disable : 4290 )
00040 // signed/unsigned mismatch
00041 #pragma warning ( disable : 4018 )
00042 // return type for 'identifier' is '' (ie; not a UDT or reference to UDT. Will
00043 // produce errors if applied using infix notation
00044 #pragma warning ( disable : 4284 )
00045 // 'type' : forcing value to bool 'true' or 'false' (performance warning)
00046 // //#pragma warning ( disable : 4800 )
00047 #endif //_MSC_VER
00048 
00049 //-----------------------------------------------------------------------------
00050 #ifdef CMAKE_HAVE_STDINT_H
00051    #include <stdint.h>
00052 #else
00053 #ifdef CMAKE_HAVE_INTTYPES_H
00054    // Old system only have this
00055    #include <inttypes.h>   // For uint8_t uint16_t and uint32_t
00056 #endif
00057 #endif
00058 
00059 // Broken plateform do not respect C99 and do not provide those typedef
00060 #if defined(_MSC_VER) || defined(__BORLANDC__)
00061 typedef  signed char         int8_t;
00062 typedef  signed short        int16_t;
00063 typedef  signed int          int32_t;
00064 typedef  unsigned char       uint8_t;
00065 typedef  unsigned short      uint16_t;
00066 typedef  unsigned int        uint32_t;
00067 #define UINT32_MAX    (4294967295U)
00068 #endif
00069 
00070 #if defined(_WIN32) && defined(BUILD_SHARED_LIBS)
00071   #ifdef gdcm_EXPORTS
00072     #define GDCM_EXPORT __declspec( dllexport )
00073   #else
00074     #define GDCM_EXPORT __declspec( dllimport )
00075   #endif
00076 #else
00077   #define GDCM_EXPORT
00078 #endif
00079 
00080 #include <string>
00081 
00082 namespace gdcm
00083 {
00084 
00085 // Centralize information about the gdcm dictionary in only one file:
00086 #ifndef PUB_DICT_PATH
00087 #  define PUB_DICT_PATH   "../Dicts/"
00088 #endif
00089 #define PUB_DICT_NAME     "DicomV3Dict"
00090 #define PUB_DICT_FILENAME "dicomV3.dic"
00091 #define DICT_ELEM         "DicomDir.dic"
00092 #define DICT_TS           "dicomTS.dic"
00093 #define DICT_VR           "dicomVR.dic"
00094 
00095 GDCM_EXPORT extern const std::string GDCM_UNKNOWN;
00096 GDCM_EXPORT extern const std::string GDCM_UNFOUND;
00097 GDCM_EXPORT extern const std::string GDCM_BINLOADED;
00098 GDCM_EXPORT extern const std::string GDCM_NOTLOADED;
00099 GDCM_EXPORT extern const std::string GDCM_UNREAD;
00100 
00128 typedef std::string TagKey;
00129 typedef std::string TagName;
00130 
00131 enum FileType {
00132    Unknown = 0,
00133    ExplicitVR, // DicomDir is in this case. Except when it's ImplicitVR !...
00134    ImplicitVR,
00135    ACR,
00136    ACR_LIBIDO
00137 };
00138 
00139 enum DicomDirType {
00140    DD_UNKNOWN = 0,
00141    DD_META,
00142    DD_PATIENT,
00143    DD_STUDY,
00144    DD_SERIE,
00145    DD_IMAGE
00146 };
00147 
00151 GDCM_EXPORT typedef struct
00152 {
00154    unsigned short int Group;
00156    unsigned short int Elem;
00158    std::string Value;
00159 } Element;
00160 
00161 } //namespace gdcm
00162 //-----------------------------------------------------------------------------
00163 #endif

Generated on Thu Feb 10 22:17:56 2005 for gdcm by doxygen 1.3.6