Mercurial > hg > orthanc
comparison Core/Enumerations.cpp @ 1993:e2a3ff770b48
introducing float32 images
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 14 May 2016 13:41:42 +0200 |
parents | ebce5f456b8e |
children | 6301bbcbcaed |
comparison
equal
deleted
inserted
replaced
1992:9161e3ef0d17 | 1993:e2a3ff770b48 |
---|---|
35 | 35 |
36 #include "OrthancException.h" | 36 #include "OrthancException.h" |
37 #include "Toolbox.h" | 37 #include "Toolbox.h" |
38 | 38 |
39 #include <string.h> | 39 #include <string.h> |
40 #include <cassert> | |
40 | 41 |
41 namespace Orthanc | 42 namespace Orthanc |
42 { | 43 { |
43 // This function is autogenerated by the script | 44 // This function is autogenerated by the script |
44 // "Resources/GenerateErrorCodes.py" | 45 // "Resources/GenerateErrorCodes.py" |
738 return "Grayscale (unsigned 16bpp)"; | 739 return "Grayscale (unsigned 16bpp)"; |
739 | 740 |
740 case PixelFormat_SignedGrayscale16: | 741 case PixelFormat_SignedGrayscale16: |
741 return "Grayscale (signed 16bpp)"; | 742 return "Grayscale (signed 16bpp)"; |
742 | 743 |
744 case PixelFormat_Float32: | |
745 return "Grayscale (float 32bpp)"; | |
746 | |
743 default: | 747 default: |
744 throw OrthancException(ErrorCode_ParameterOutOfRange); | 748 throw OrthancException(ErrorCode_ParameterOutOfRange); |
745 } | 749 } |
746 } | 750 } |
747 | 751 |
909 | 913 |
910 case PixelFormat_RGB24: | 914 case PixelFormat_RGB24: |
911 return 3; | 915 return 3; |
912 | 916 |
913 case PixelFormat_RGBA32: | 917 case PixelFormat_RGBA32: |
918 return 4; | |
919 | |
920 case PixelFormat_Float32: | |
921 assert(sizeof(float) == 4); | |
914 return 4; | 922 return 4; |
915 | 923 |
916 default: | 924 default: |
917 throw OrthancException(ErrorCode_ParameterOutOfRange); | 925 throw OrthancException(ErrorCode_ParameterOutOfRange); |
918 } | 926 } |