comparison Core/Enumerations.h @ 948:e57e08ed510f dicom-rt

integration mainline -> dicom-rt
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 25 Jun 2014 13:57:05 +0200
parents 3c0d0836f704
children 0570a8c859cb 766a57997121
comparison
equal deleted inserted replaced
767:c19552f604d5 948:e57e08ed510f
66 ErrorCode_Timeout, 66 ErrorCode_Timeout,
67 ErrorCode_UnknownResource, 67 ErrorCode_UnknownResource,
68 ErrorCode_IncompatibleDatabaseVersion, 68 ErrorCode_IncompatibleDatabaseVersion,
69 ErrorCode_FullStorage, 69 ErrorCode_FullStorage,
70 ErrorCode_CorruptedFile, 70 ErrorCode_CorruptedFile,
71 ErrorCode_InexistentTag 71 ErrorCode_InexistentTag,
72 ErrorCode_ReadOnly,
73 ErrorCode_IncompatibleImageFormat,
74 ErrorCode_IncompatibleImageSize
72 }; 75 };
73 76
74 /** 77 /**
75 * {summary}{The memory layout of the pixels (resp. voxels) of a 2D (resp. 3D) image.} 78 * {summary}{The memory layout of the pixels (resp. voxels) of a 2D (resp. 3D) image.}
76 **/ 79 **/
77 enum LAAW_API PixelFormat 80 enum LAAW_API PixelFormat
78 { 81 {
79 /** 82 /**
80 * {summary}{Color image in RGB24 format.} 83 * {summary}{Color image in RGB24 format.}
81 * {description}{This format describes a color image. The pixels are stored in 3 84 * {description}{This format describes a color image. The pixels are stored in 3
82 * consecutive bytes. The memory layout is RGB. 85 * consecutive bytes. The memory layout is RGB.}
83 **/ 86 **/
84 PixelFormat_RGB24, 87 PixelFormat_RGB24 = 1,
88
89 /**
90 * {summary}{Color image in RGBA32 format.}
91 * {description}{This format describes a color image. The pixels are stored in 4
92 * consecutive bytes. The memory layout is RGBA.}
93 **/
94 PixelFormat_RGBA32 = 2,
85 95
86 /** 96 /**
87 * {summary}{Graylevel 8bpp image.} 97 * {summary}{Graylevel 8bpp image.}
88 * {description}{The image is graylevel. Each pixel is unsigned and stored in one byte.} 98 * {description}{The image is graylevel. Each pixel is unsigned and stored in one byte.}
89 **/ 99 **/
90 PixelFormat_Grayscale8, 100 PixelFormat_Grayscale8 = 3,
91 101
92 /** 102 /**
93 * {summary}{Graylevel, unsigned 16bpp image.} 103 * {summary}{Graylevel, unsigned 16bpp image.}
94 * {description}{The image is graylevel. Each pixel is unsigned and stored in two bytes.} 104 * {description}{The image is graylevel. Each pixel is unsigned and stored in two bytes.}
95 **/ 105 **/
96 PixelFormat_Grayscale16, 106 PixelFormat_Grayscale16 = 4,
97 107
98 /** 108 /**
99 * {summary}{Graylevel, signed 16bpp image.} 109 * {summary}{Graylevel, signed 16bpp image.}
100 * {description}{The image is graylevel. Each pixel is signed and stored in two bytes.} 110 * {description}{The image is graylevel. Each pixel is signed and stored in two bytes.}
101 **/ 111 **/
102 PixelFormat_SignedGrayscale16 112 PixelFormat_SignedGrayscale16 = 5
103 }; 113 };
104 114
105 115
106 /** 116 /**
107 * {summary}{The extraction mode specifies the way the values of the pixels are scaled when downloading a 2D image.} 117 * {summary}{The extraction mode specifies the way the values of the pixels are scaled when downloading a 2D image.}
110 { 120 {
111 /** 121 /**
112 * {summary}{Rescaled to 8bpp.} 122 * {summary}{Rescaled to 8bpp.}
113 * {description}{The minimum value of the image is set to 0, and its maximum value is set to 255.} 123 * {description}{The minimum value of the image is set to 0, and its maximum value is set to 255.}
114 **/ 124 **/
115 ImageExtractionMode_Preview, 125 ImageExtractionMode_Preview = 1,
116 126
117 /** 127 /**
118 * {summary}{Truncation to the [0, 255] range.} 128 * {summary}{Truncation to the [0, 255] range.}
119 **/ 129 **/
120 ImageExtractionMode_UInt8, 130 ImageExtractionMode_UInt8 = 2,
121 131
122 /** 132 /**
123 * {summary}{Truncation to the [0, 65535] range.} 133 * {summary}{Truncation to the [0, 65535] range.}
124 **/ 134 **/
125 ImageExtractionMode_UInt16, 135 ImageExtractionMode_UInt16 = 3,
126 136
127 /** 137 /**
128 * {summary}{Truncation to the [-32768, 32767] range.} 138 * {summary}{Truncation to the [-32768, 32767] range.}
129 **/ 139 **/
130 ImageExtractionMode_Int16 140 ImageExtractionMode_Int16 = 4
131 }; 141 };
132 142
133 143
134 /** 144 /**
135 * Most common, non-joke and non-experimental HTTP status codes 145 * Most common, non-joke and non-experimental HTTP status codes
210 HttpMethod_Delete = 2, 220 HttpMethod_Delete = 2,
211 HttpMethod_Put = 3 221 HttpMethod_Put = 3
212 }; 222 };
213 223
214 224
225 enum ImageFormat
226 {
227 ImageFormat_Png = 1
228 };
229
230
215 /** 231 /**
216 * WARNING: Do not change the explicit values in the enumerations 232 * WARNING: Do not change the explicit values in the enumerations
217 * below this point. This would result in incompatible databases 233 * below this point. This would result in incompatible databases
218 * between versions of Orthanc! 234 * between versions of Orthanc!
219 **/ 235 **/
247 263
248 const char* EnumerationToString(HttpStatus status); 264 const char* EnumerationToString(HttpStatus status);
249 265
250 const char* EnumerationToString(ResourceType type); 266 const char* EnumerationToString(ResourceType type);
251 267
268 const char* EnumerationToString(ImageFormat format);
269
252 ResourceType StringToResourceType(const char* type); 270 ResourceType StringToResourceType(const char* type);
271
272 ImageFormat StringToImageFormat(const char* format);
273
274 unsigned int GetBytesPerPixel(PixelFormat format);
253 } 275 }