OFFIS DCMTK  Version 3.6.0
dcerror.h
1 /*
2  *
3  * Copyright (C) 1994-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  *
14  * Module: dcmdata
15  *
16  * Author: Andrew Hewett
17  *
18  * Purpose: Error handling, codes and strings
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-10-14 13:15:41 $
22  * CVS/RCS Revision: $Revision: 1.36 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 
30 #ifndef DCERROR_H
31 #define DCERROR_H
32 
33 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
34 #include "dcmtk/ofstd/ofcond.h" /* for OFCondition */
35 
36 /*
37  * DCMTK module numbers for modules which create their own error codes.
38  * Module numbers > 1023 are reserved for user code.
39  */
40 
41 const unsigned short OFM_dcmdata = 1;
42 const unsigned short OFM_ctndisp = 2; /* retired */
43 const unsigned short OFM_dcmimgle = 3;
44 const unsigned short OFM_dcmimage = 4;
45 const unsigned short OFM_dcmjpeg = 5;
46 const unsigned short OFM_dcmnet = 6;
47 const unsigned short OFM_dcmprint = 7;
48 const unsigned short OFM_dcmpstat = 8;
49 const unsigned short OFM_dcmsign = 9;
50 const unsigned short OFM_dcmsr = 10;
51 const unsigned short OFM_dcmtls = 11;
52 const unsigned short OFM_imagectn = 12;
53 const unsigned short OFM_wlistctn = 13; /* retired */
54 const unsigned short OFM_dcmwlm = 14;
55 const unsigned short OFM_dcmpps = 15;
56 const unsigned short OFM_dcmdbsup = 16;
57 const unsigned short OFM_dcmppswm = 17;
58 const unsigned short OFM_dcmjp2k = 18;
59 const unsigned short OFM_dcmjpls = 19;
60 const unsigned short OFM_dcmwave = 20;
61 const unsigned short OFM_dcmrt = 21;
62 const unsigned short OFM_dcmloco = 22;
63 const unsigned short OFM_dcmstcom = 23;
64 const unsigned short OFM_dcmppscu = 24;
65 
66 
67 // condition constants
68 
70 extern const OFCondition EC_InvalidTag;
72 extern const OFCondition EC_TagNotFound;
74 extern const OFCondition EC_InvalidVR;
76 extern const OFCondition EC_InvalidStream;
78 extern const OFCondition EC_EndOfStream;
80 extern const OFCondition EC_CorruptedData;
82 extern const OFCondition EC_IllegalCall;
84 extern const OFCondition EC_SequEnd;
86 extern const OFCondition EC_DoubledTag;
88 extern const OFCondition EC_StreamNotifyClient;
90 extern const OFCondition EC_WrongStreamMode;
92 extern const OFCondition EC_ItemEnd;
94 extern const OFCondition EC_RepresentationNotFound;
96 extern const OFCondition EC_CannotChangeRepresentation;
98 extern const OFCondition EC_UnsupportedEncoding;
100 extern const OFCondition EC_PutbackFailed;
102 extern const OFCondition EC_DoubleCompressionFilters;
104 extern const OFCondition EC_ApplicationProfileViolated;
106 extern const OFCondition EC_InvalidOffset;
108 extern const OFCondition EC_TooManyBytesRequested;
109 // Invalid basic offset table
110 extern const OFCondition EC_InvalidBasicOffsetTable;
112 extern const OFCondition EC_ElemLengthLargerThanItem;
114 extern const OFCondition EC_FileMetaInfoHeaderMissing;
116 extern const OFCondition EC_SeqOrItemContentOverflow;
118 extern const OFCondition EC_ValueRepresentationViolated;
120 extern const OFCondition EC_ValueMultiplicityViolated;
122 extern const OFCondition EC_MaximumLengthViolated;
124 extern const OFCondition EC_ElemLengthExceeds16BitField;
125 
126 #ifndef OFCONDITION_STRICT_MODE
127 
128 // for backward compatibility with existing software
129 typedef OFCondition E_Condition;
130 
134 extern const char *dcmErrorConditionToString(OFCondition cond);
135 
136 #endif
137 
138 
139 #endif /* !DCERROR_H */
140 
141 /*
142 ** CVS/RCS Log:
143 ** $Log: dcerror.h,v $
144 ** Revision 1.36 2010-10-14 13:15:41 joergr
145 ** Updated copyright header. Added reference to COPYRIGHT file.
146 **
147 ** Revision 1.35 2010-07-30 16:52:51 onken
148 ** Added error code for new (non-public) module dcmppscu.
149 **
150 ** Revision 1.34 2010-06-09 15:53:34 joergr
151 ** Added number for new module "dcmstcom", used for module-specific error codes.
152 **
153 ** Revision 1.33 2010-02-25 13:50:50 joergr
154 ** Fixed issue with element values which exceed the maximum of a 16-bit length
155 ** field.
156 **
157 ** Revision 1.32 2009-08-03 09:05:29 joergr
158 ** Added methods that check whether a given string value conforms to the VR and
159 ** VM definitions of the DICOM standards.
160 **
161 ** Revision 1.31 2009-07-29 14:16:15 meichel
162 ** Defined new constant OFM_dcmloco
163 **
164 ** Revision 1.30 2009-03-19 11:46:20 joergr
165 ** Fixed issue with Doxygen documentation.
166 **
167 ** Revision 1.29 2009-03-05 13:35:47 onken
168 ** Added checks for sequence and item lengths which prevents overflow in length
169 ** field, if total length of contained items (or sequences) exceeds
170 ** 32-bit length field. Also introduced new flag (default: enabled)
171 ** for writing in explicit length mode, which allows for automatically
172 ** switching encoding of only that very sequence/item to undefined
173 ** length coding (thus permitting to actually write the file).
174 **
175 ** Revision 1.28 2009-02-11 16:36:04 joergr
176 ** Introduced new error code EC_FileMetaInfoHeaderMissing.
177 **
178 ** Revision 1.27 2009-02-04 17:54:30 joergr
179 ** Fixed various layout and formatting issues.
180 **
181 ** Revision 1.26 2009-02-04 14:06:03 onken
182 ** Changed parser to make use of the new error ignoring flag when parsing.
183 ** Added check (makes use of new flag) that notes whether an element's value is
184 ** specified larger than the surrounding item (applicable for explicit length
185 ** coding).
186 **
187 ** Revision 1.25 2009-02-04 10:17:23 joergr
188 ** Introduced new error code EC_InvalidBasicOffsetTable.
189 **
190 ** Revision 1.24 2008-12-08 14:34:54 joergr
191 ** Added number for new module "dcmrt", used for module-specific error codes.
192 **
193 ** Revision 1.23 2008-07-17 10:28:36 onken
194 ** Added error constant for upcoming dcmwave module.
195 **
196 ** Revision 1.22 2007-11-29 14:30:35 meichel
197 ** Updated doxygen API documentation
198 **
199 ** Revision 1.21 2007/06/13 14:45:47 meichel
200 ** Added module code OFM_dcmjpls and some new error codes.
201 **
202 ** Revision 1.20 2005/12/08 16:28:12 meichel
203 ** Changed include path schema for all DCMTK header files
204 **
205 ** Revision 1.19 2004/08/24 14:53:15 meichel
206 ** Added module number for future dcmjp2k module
207 **
208 ** Revision 1.18 2002/12/06 12:18:27 joergr
209 ** Added new error status "EC_ApplicationProfileViolated".
210 **
211 ** Revision 1.17 2002/08/27 16:55:32 meichel
212 ** Initial release of new DICOM I/O stream classes that add support for stream
213 ** compression (deflated little endian explicit VR transfer syntax)
214 **
215 ** Revision 1.16 2002/08/12 09:56:59 wilkens
216 ** Added module number (for error codes) for new module dcmppswm.
217 **
218 ** Revision 1.15 2002/05/28 08:44:21 wilkens
219 ** Added module number for new module dcmdbsup.
220 **
221 ** Revision 1.14 2002/04/18 14:47:22 wilkens
222 ** Inserted a new dcmtk module number for module mpps.
223 **
224 ** Revision 1.13 2002/01/08 17:53:30 joergr
225 ** Added new module "dcmwlm".
226 **
227 ** Revision 1.12 2001/11/19 12:44:50 joergr
228 ** Added dcmimage to list of modules.
229 **
230 ** Revision 1.11 2001/10/12 10:42:28 meichel
231 ** Introduced conditional define OFCONDITION_STRICT_MODE in which the
232 ** compatibility options related to the transition to OFCondition are disabled:
233 ** No OFCondition default constructor, no typedefs for E_Condition, CONDITION,
234 ** no macros for SUCCESS and condition aliases.
235 **
236 ** Revision 1.10 2001/09/25 17:22:22 meichel
237 ** Enabled E_Condition and dcmErrorConditionToString() for backward
238 ** compatibility with existing code.
239 **
240 ** Revision 1.9 2001/09/25 17:19:26 meichel
241 ** Adapted dcmdata to class OFCondition
242 **
243 ** Revision 1.8 2001/06/01 15:48:39 meichel
244 ** Updated copyright header
245 **
246 ** Revision 1.7 2000/03/08 16:26:14 meichel
247 ** Updated copyright header.
248 **
249 ** Revision 1.6 1999/03/31 09:24:38 meichel
250 ** Updated copyright header in module dcmdata
251 **
252 ** Revision 1.5 1997/07/21 08:15:10 andreas
253 ** - New environment for encapsulated pixel representations. DcmPixelData
254 ** can contain different representations and uses codecs to convert
255 ** between them. Codecs are derived from the DcmCodec class. New error
256 ** codes are introduced for handling of representations. New internal
257 ** value representation (only for ident()) for PixelData
258 **
259 ** Revision 1.4 1997/05/22 16:55:02 andreas
260 ** - Added new error code EC_NotImplemented
261 **
262 ** Revision 1.3 1996/01/29 13:38:12 andreas
263 ** - new put method for every VR to put value as a string
264 ** - better and unique print methods
265 **
266 ** Revision 1.2 1996/01/05 13:22:55 andreas
267 ** - changed to support new streaming facilities
268 ** - more cleanups
269 ** - merged read / write methods for block and file transfer
270 **
271 ** Revision 1.1 1995/11/23 16:37:54 hewett
272 ** Updated for loadable data dictionary + some cleanup (more to do).
273 **
274 */


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2