00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef DJERROR_H
00030 #define DJERROR_H
00031
00032 #include "dcmtk/config/osconfig.h"
00033 #include "dcmtk/dcmjpls/djlsutil.h"
00034 #include "intrface.h"
00035
00038 class DJLSError
00039 {
00040 private:
00042 DJLSError();
00043
00044 public:
00045
00050 static const OFCondition& convert(JLS_ERROR error)
00051 {
00052 switch (error)
00053 {
00054 case OK:
00055 return EC_Normal;
00056 case UncompressedBufferTooSmall:
00057 return EC_JLSUncompressedBufferTooSmall;
00058 case CompressedBufferTooSmall:
00059 return EC_JLSCompressedBufferTooSmall;
00060 case ImageTypeNotSupported:
00061 return EC_JLSCodecUnsupportedImageType;
00062 case InvalidJlsParameters:
00063 return EC_JLSCodecInvalidParameters;
00064 case ParameterValueNotSupported:
00065 return EC_JLSCodecUnsupportedValue;
00066 case InvalidCompressedData:
00067 return EC_JLSInvalidCompressedData;
00068 case UnsupportedBitDepthForTransform:
00069 return EC_JLSUnsupportedBitDepthForTransform;
00070 case UnsupportedColorTransform:
00071 return EC_JLSUnsupportedColorTransform;
00072 case TooMuchCompressedData:
00073 return EC_JLSTooMuchCompressedData;
00074 default:
00075 return EC_IllegalParameter;
00076 }
00077 }
00078 };
00079
00080 #endif
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101