dcmdata/include/dcmtk/dcmdata/dcerror.h

00001 /*
00002  *
00003  *  Copyright (C) 1994-2010, OFFIS e.V.
00004  *  All rights reserved.  See COPYRIGHT file for details.
00005  *
00006  *  This software and supporting documentation were developed by
00007  *
00008  *    OFFIS e.V.
00009  *    R&D Division Health
00010  *    Escherweg 2
00011  *    D-26121 Oldenburg, Germany
00012  *
00013  *
00014  *  Module:  dcmdata
00015  *
00016  *  Author:  Andrew Hewett
00017  *
00018  *  Purpose: Error handling, codes and strings
00019  *
00020  *  Last Update:      $Author: joergr $
00021  *  Update Date:      $Date: 2010-10-14 13:15:41 $
00022  *  CVS/RCS Revision: $Revision: 1.36 $
00023  *  Status:           $State: Exp $
00024  *
00025  *  CVS/RCS Log at end of file
00026  *
00027  */
00028 
00029 
00030 #ifndef DCERROR_H
00031 #define DCERROR_H
00032 
00033 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
00034 #include "dcmtk/ofstd/ofcond.h"       /* for OFCondition */
00035 
00036 /*
00037  *  DCMTK module numbers for modules which create their own error codes.
00038  *  Module numbers > 1023 are reserved for user code.
00039  */
00040 
00041 const unsigned short OFM_dcmdata  =  1;
00042 const unsigned short OFM_ctndisp  =  2;   /* retired */
00043 const unsigned short OFM_dcmimgle =  3;
00044 const unsigned short OFM_dcmimage =  4;
00045 const unsigned short OFM_dcmjpeg  =  5;
00046 const unsigned short OFM_dcmnet   =  6;
00047 const unsigned short OFM_dcmprint =  7;
00048 const unsigned short OFM_dcmpstat =  8;
00049 const unsigned short OFM_dcmsign  =  9;
00050 const unsigned short OFM_dcmsr    = 10;
00051 const unsigned short OFM_dcmtls   = 11;
00052 const unsigned short OFM_imagectn = 12;
00053 const unsigned short OFM_wlistctn = 13;   /* retired */
00054 const unsigned short OFM_dcmwlm   = 14;
00055 const unsigned short OFM_dcmpps   = 15;
00056 const unsigned short OFM_dcmdbsup = 16;
00057 const unsigned short OFM_dcmppswm = 17;
00058 const unsigned short OFM_dcmjp2k  = 18;
00059 const unsigned short OFM_dcmjpls  = 19;
00060 const unsigned short OFM_dcmwave  = 20;
00061 const unsigned short OFM_dcmrt    = 21;
00062 const unsigned short OFM_dcmloco  = 22;
00063 const unsigned short OFM_dcmstcom = 23;
00064 const unsigned short OFM_dcmppscu = 24;
00065 
00066 
00067 // condition constants
00068 
00070 extern const OFCondition EC_InvalidTag;
00072 extern const OFCondition EC_TagNotFound;
00074 extern const OFCondition EC_InvalidVR;
00076 extern const OFCondition EC_InvalidStream;
00078 extern const OFCondition EC_EndOfStream;
00080 extern const OFCondition EC_CorruptedData;
00082 extern const OFCondition EC_IllegalCall;
00084 extern const OFCondition EC_SequEnd;
00086 extern const OFCondition EC_DoubledTag;
00088 extern const OFCondition EC_StreamNotifyClient;
00090 extern const OFCondition EC_WrongStreamMode;
00092 extern const OFCondition EC_ItemEnd;
00094 extern const OFCondition EC_RepresentationNotFound;
00096 extern const OFCondition EC_CannotChangeRepresentation;
00098 extern const OFCondition EC_UnsupportedEncoding;
00100 extern const OFCondition EC_PutbackFailed;
00102 extern const OFCondition EC_DoubleCompressionFilters;
00104 extern const OFCondition EC_ApplicationProfileViolated;
00106 extern const OFCondition EC_InvalidOffset;
00108 extern const OFCondition EC_TooManyBytesRequested;
00109 // Invalid basic offset table
00110 extern const OFCondition EC_InvalidBasicOffsetTable;
00112 extern const OFCondition EC_ElemLengthLargerThanItem;
00114 extern const OFCondition EC_FileMetaInfoHeaderMissing;
00116 extern const OFCondition EC_SeqOrItemContentOverflow;
00118 extern const OFCondition EC_ValueRepresentationViolated;
00120 extern const OFCondition EC_ValueMultiplicityViolated;
00122 extern const OFCondition EC_MaximumLengthViolated;
00124 extern const OFCondition EC_ElemLengthExceeds16BitField;
00125 
00126 #ifndef OFCONDITION_STRICT_MODE
00127 
00128 // for backward compatibility with existing software
00129 typedef OFCondition E_Condition;
00130 
00134 extern const char *dcmErrorConditionToString(OFCondition cond);
00135 
00136 #endif
00137 
00138 
00139 #endif /* !DCERROR_H */
00140 
00141 /*
00142 ** CVS/RCS Log:
00143 ** $Log: dcerror.h,v $
00144 ** Revision 1.36  2010-10-14 13:15:41  joergr
00145 ** Updated copyright header. Added reference to COPYRIGHT file.
00146 **
00147 ** Revision 1.35  2010-07-30 16:52:51  onken
00148 ** Added error code for new (non-public) module dcmppscu.
00149 **
00150 ** Revision 1.34  2010-06-09 15:53:34  joergr
00151 ** Added number for new module "dcmstcom", used for module-specific error codes.
00152 **
00153 ** Revision 1.33  2010-02-25 13:50:50  joergr
00154 ** Fixed issue with element values which exceed the maximum of a 16-bit length
00155 ** field.
00156 **
00157 ** Revision 1.32  2009-08-03 09:05:29  joergr
00158 ** Added methods that check whether a given string value conforms to the VR and
00159 ** VM definitions of the DICOM standards.
00160 **
00161 ** Revision 1.31  2009-07-29 14:16:15  meichel
00162 ** Defined new constant OFM_dcmloco
00163 **
00164 ** Revision 1.30  2009-03-19 11:46:20  joergr
00165 ** Fixed issue with Doxygen documentation.
00166 **
00167 ** Revision 1.29  2009-03-05 13:35:47  onken
00168 ** Added checks for sequence and item lengths which prevents overflow in length
00169 ** field, if total length of contained items (or sequences) exceeds
00170 ** 32-bit length field. Also introduced new flag (default: enabled)
00171 ** for writing in explicit length mode, which allows for automatically
00172 ** switching encoding of only that very sequence/item to undefined
00173 ** length coding (thus permitting to actually write the file).
00174 **
00175 ** Revision 1.28  2009-02-11 16:36:04  joergr
00176 ** Introduced new error code EC_FileMetaInfoHeaderMissing.
00177 **
00178 ** Revision 1.27  2009-02-04 17:54:30  joergr
00179 ** Fixed various layout and formatting issues.
00180 **
00181 ** Revision 1.26  2009-02-04 14:06:03  onken
00182 ** Changed parser to make use of the new error ignoring flag when parsing.
00183 ** Added check (makes use of new flag) that notes whether an element's value is
00184 ** specified larger than the surrounding item (applicable for explicit length
00185 ** coding).
00186 **
00187 ** Revision 1.25  2009-02-04 10:17:23  joergr
00188 ** Introduced new error code EC_InvalidBasicOffsetTable.
00189 **
00190 ** Revision 1.24  2008-12-08 14:34:54  joergr
00191 ** Added number for new module "dcmrt", used for module-specific error codes.
00192 **
00193 ** Revision 1.23  2008-07-17 10:28:36  onken
00194 ** Added error constant for upcoming dcmwave module.
00195 **
00196 ** Revision 1.22  2007-11-29 14:30:35  meichel
00197 ** Updated doxygen API documentation
00198 **
00199 ** Revision 1.21  2007/06/13 14:45:47  meichel
00200 ** Added module code OFM_dcmjpls and some new error codes.
00201 **
00202 ** Revision 1.20  2005/12/08 16:28:12  meichel
00203 ** Changed include path schema for all DCMTK header files
00204 **
00205 ** Revision 1.19  2004/08/24 14:53:15  meichel
00206 ** Added module number for future dcmjp2k module
00207 **
00208 ** Revision 1.18  2002/12/06 12:18:27  joergr
00209 ** Added new error status "EC_ApplicationProfileViolated".
00210 **
00211 ** Revision 1.17  2002/08/27 16:55:32  meichel
00212 ** Initial release of new DICOM I/O stream classes that add support for stream
00213 **   compression (deflated little endian explicit VR transfer syntax)
00214 **
00215 ** Revision 1.16  2002/08/12 09:56:59  wilkens
00216 ** Added module number (for error codes) for new module dcmppswm.
00217 **
00218 ** Revision 1.15  2002/05/28 08:44:21  wilkens
00219 ** Added module number for new module dcmdbsup.
00220 **
00221 ** Revision 1.14  2002/04/18 14:47:22  wilkens
00222 ** Inserted a new dcmtk module number for module mpps.
00223 **
00224 ** Revision 1.13  2002/01/08 17:53:30  joergr
00225 ** Added new module "dcmwlm".
00226 **
00227 ** Revision 1.12  2001/11/19 12:44:50  joergr
00228 ** Added dcmimage to list of modules.
00229 **
00230 ** Revision 1.11  2001/10/12 10:42:28  meichel
00231 ** Introduced conditional define OFCONDITION_STRICT_MODE in which the
00232 **   compatibility options related to the transition to OFCondition are disabled:
00233 **   No OFCondition default constructor, no typedefs for E_Condition, CONDITION,
00234 **   no macros for SUCCESS and condition aliases.
00235 **
00236 ** Revision 1.10  2001/09/25 17:22:22  meichel
00237 ** Enabled E_Condition and dcmErrorConditionToString() for backward
00238 **   compatibility with existing code.
00239 **
00240 ** Revision 1.9  2001/09/25 17:19:26  meichel
00241 ** Adapted dcmdata to class OFCondition
00242 **
00243 ** Revision 1.8  2001/06/01 15:48:39  meichel
00244 ** Updated copyright header
00245 **
00246 ** Revision 1.7  2000/03/08 16:26:14  meichel
00247 ** Updated copyright header.
00248 **
00249 ** Revision 1.6  1999/03/31 09:24:38  meichel
00250 ** Updated copyright header in module dcmdata
00251 **
00252 ** Revision 1.5  1997/07/21 08:15:10  andreas
00253 ** - New environment for encapsulated pixel representations. DcmPixelData
00254 **   can contain different representations and uses codecs to convert
00255 **   between them. Codecs are derived from the DcmCodec class. New error
00256 **   codes are introduced for handling of representations. New internal
00257 **   value representation (only for ident()) for PixelData
00258 **
00259 ** Revision 1.4  1997/05/22 16:55:02  andreas
00260 ** - Added new error code EC_NotImplemented
00261 **
00262 ** Revision 1.3  1996/01/29 13:38:12  andreas
00263 ** - new put method for every VR to put value as a string
00264 ** - better and unique print methods
00265 **
00266 ** Revision 1.2  1996/01/05 13:22:55  andreas
00267 ** - changed to support new streaming facilities
00268 ** - more cleanups
00269 ** - merged read / write methods for block and file transfer
00270 **
00271 ** Revision 1.1  1995/11/23 16:37:54  hewett
00272 ** Updated for loadable data dictionary + some cleanup (more to do).
00273 **
00274 */


Generated on 6 Jan 2011 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.5.1