Mercurial > hg > orthanc
comparison Core/Images/ImageAccessor.cpp @ 1993:e2a3ff770b48
introducing float32 images
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 14 May 2016 13:41:42 +0200 |
parents | 369897749653 |
children | a89ca69ec1d1 |
comparison
equal
deleted
inserted
replaced
1992:9161e3ef0d17 | 1993:e2a3ff770b48 |
---|---|
63 | 63 |
64 s.reserve(source.GetWidth() * 8); | 64 s.reserve(source.GetWidth() * 8); |
65 | 65 |
66 for (unsigned int x = 0; x < source.GetWidth(); x++, p++) | 66 for (unsigned int x = 0; x < source.GetWidth(); x++, p++) |
67 { | 67 { |
68 s += boost::lexical_cast<std::string>(static_cast<int>(*p)) + " "; | 68 s += boost::lexical_cast<std::string>(static_cast<double>(*p)) + " "; |
69 } | 69 } |
70 | 70 |
71 target.AddChunk(s); | 71 target.AddChunk(s); |
72 } | 72 } |
73 | 73 |
219 | 219 |
220 case PixelFormat_SignedGrayscale16: | 220 case PixelFormat_SignedGrayscale16: |
221 ToMatlabStringInternal<int16_t>(buffer, *this); | 221 ToMatlabStringInternal<int16_t>(buffer, *this); |
222 break; | 222 break; |
223 | 223 |
224 case PixelFormat_Float32: | |
225 ToMatlabStringInternal<float>(buffer, *this); | |
226 break; | |
227 | |
224 case PixelFormat_RGB24: | 228 case PixelFormat_RGB24: |
225 RGB24ToMatlabString(buffer, *this); | 229 RGB24ToMatlabString(buffer, *this); |
226 break; | 230 break; |
227 | 231 |
228 default: | 232 default: |