Mercurial > hg > orthanc
comparison Core/Enumerations.cpp @ 1206:f5b0207967bc
Fix issue #19 (YBR_FULL are decoded incorrectly)
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 03 Nov 2014 15:19:02 +0100 |
parents | 200fcac0deb4 |
children | 6e7e5ed91c2d |
comparison
equal
deleted
inserted
replaced
1205:bb1ad2fbf914 | 1206:f5b0207967bc |
---|---|
311 throw OrthancException(ErrorCode_ParameterOutOfRange); | 311 throw OrthancException(ErrorCode_ParameterOutOfRange); |
312 } | 312 } |
313 } | 313 } |
314 | 314 |
315 | 315 |
316 const char* EnumerationToString(PhotometricInterpretation photometric) | |
317 { | |
318 switch (photometric) | |
319 { | |
320 case PhotometricInterpretation_RGB: | |
321 return "RGB"; | |
322 | |
323 case PhotometricInterpretation_Monochrome1: | |
324 return "Monochrome1"; | |
325 | |
326 case PhotometricInterpretation_Monochrome2: | |
327 return "Monochrome2"; | |
328 | |
329 case PhotometricInterpretation_ARGB: | |
330 return "ARGB"; | |
331 | |
332 case PhotometricInterpretation_CMYK: | |
333 return "CMYK"; | |
334 | |
335 case PhotometricInterpretation_HSV: | |
336 return "HSV"; | |
337 | |
338 case PhotometricInterpretation_Palette: | |
339 return "Palette color"; | |
340 | |
341 case PhotometricInterpretation_YBRFull: | |
342 return "YBR full"; | |
343 | |
344 case PhotometricInterpretation_YBRFull422: | |
345 return "YBR full 422"; | |
346 | |
347 case PhotometricInterpretation_YBRPartial420: | |
348 return "YBR partial 420"; | |
349 | |
350 case PhotometricInterpretation_YBRPartial422: | |
351 return "YBR partial 422"; | |
352 | |
353 case PhotometricInterpretation_YBR_ICT: | |
354 return "YBR ICT"; | |
355 | |
356 case PhotometricInterpretation_YBR_RCT: | |
357 return "YBR RCT"; | |
358 | |
359 case PhotometricInterpretation_Unknown: | |
360 return "Unknown"; | |
361 | |
362 default: | |
363 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
364 } | |
365 } | |
366 | |
367 | |
316 Encoding StringToEncoding(const char* encoding) | 368 Encoding StringToEncoding(const char* encoding) |
317 { | 369 { |
318 std::string s(encoding); | 370 std::string s(encoding); |
319 Toolbox::ToUpperCase(s); | 371 Toolbox::ToUpperCase(s); |
320 | 372 |