Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | 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: 2006/01/10 15:54:03 $
00007   Version:   $Revision: 1.102 $
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 #include "gdcmSystem.h"
00024 #include "gdcmMacro.h"
00025 
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 //-----------------------------------------------------------------------------
00041 namespace gdcm
00042 {
00043 
00044 // Centralize information about the gdcm dictionary in only one file:
00045 #ifndef PUB_DICT_PATH
00046 #  define PUB_DICT_PATH   "../Dicts/"
00047 #endif
00048 #define PUB_DICT_NAME     "DicomV3Dict"
00049 #define PUB_DICT_FILENAME "gdcm.dic"
00050 #define DICT_ELEM         "DicomDir.dic"
00051 #define DICT_TS           "dicomTS.dic"
00052 #define DICT_VR           "dicomVR.dic"
00053 #define DICT_GROUP_NAME   "DictGroupName.dic"
00054 
00055 GDCM_EXPORT extern const std::string GDCM_UNKNOWN;
00056 GDCM_EXPORT extern const std::string GDCM_UNFOUND;
00057 GDCM_EXPORT extern const std::string GDCM_BINLOADED;
00058 GDCM_EXPORT extern const std::string GDCM_NOTLOADED;
00059 GDCM_EXPORT extern const std::string GDCM_UNREAD;
00060 GDCM_EXPORT extern const std::string GDCM_NOTASCII;
00061 GDCM_EXPORT extern const std::string GDCM_PIXELDATA;
00062 
00063 GDCM_EXPORT extern const std::string GDCM_VRUNKNOWN;
00064 
00065 GDCM_EXPORT extern const char GDCM_FILESEPARATOR;
00066 
00074 
00075 #if defined(_MSC_VER) && (_MSC_VER == 1200)
00076 // Doing everything within gdcm namespace to avoid polluting 3d party software
00077 inline std::ostream& operator<<(std::ostream& _O, std::string _val)
00078 {
00079   return _O << _val.c_str();
00080 }
00081 #endif
00082 
00085 typedef std::string TagName;
00086 
00088 enum FileType {
00089    Unknown = 0,
00090    ExplicitVR, // DicomDir is in this case. Except when it's ImplicitVR !...
00091    ImplicitVR,
00092    ACR,
00093    ACR_LIBIDO,
00094    JPEG
00095 };
00096 
00098 enum DicomDirType {
00099    DD_UNKNOWN = 0,
00100    DD_META,
00101    DD_PATIENT,
00102    DD_STUDY,
00103    DD_SERIE,
00104    DD_IMAGE,
00105    DD_VISIT
00106 };
00107 
00109 enum CompOperators {
00110    GDCM_EQUAL = 0,
00111    GDCM_DIFFERENT,
00112    GDCM_GREATER,
00113    GDCM_GREATEROREQUAL,
00114    GDCM_LESS,
00115    GDCM_LESSOREQUAL
00116 };
00117 
00119 enum LodModeType
00120 {
00121    LD_ALL         = 0x00000000, // Load all
00122    LD_NOSEQ       = 0x00000001, // Don't load Sequences
00123    LD_NOSHADOW    = 0x00000002, // Don't load odd groups
00124    LD_NOSHADOWSEQ = 0x00000004  // Don't load Sequences if they belong 
00125                                 //            to an odd group
00126                                 // (*exclusive* from LD_NOSEQ and LD_NOSHADOW)
00127 };
00128 
00132 struct DicomElement
00133 {
00135    unsigned short int Group;
00137    unsigned short int Elem;
00139    std::string Value;
00140 };
00141 
00142 } //namespace gdcm
00143 //-----------------------------------------------------------------------------
00144 #endif

Generated on Fri Jan 20 10:14:23 2006 for gdcm by  doxygen 1.4.4