Mercurial > hg > orthanc
comparison OrthancServer/FromDcmtkBridge.cpp @ 71:aa65ced5f0f0
fix for visual studio
author | jodogne |
---|---|
date | Mon, 17 Sep 2012 12:34:55 +0200 |
parents | a70bb32802ae |
children | cb5ad233c336 |
comparison
equal
deleted
inserted
replaced
69:fce53dabac6d | 71:aa65ced5f0f0 |
---|---|
15 * | 15 * |
16 * You should have received a copy of the GNU General Public License | 16 * You should have received a copy of the GNU General Public License |
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. | 17 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
18 **/ | 18 **/ |
19 | 19 |
20 #ifndef NOMINMAX | |
21 #define NOMINMAX | |
22 #endif | |
20 | 23 |
21 #include "FromDcmtkBridge.h" | 24 #include "FromDcmtkBridge.h" |
22 | 25 |
23 #include "ToDcmtkBridge.h" | 26 #include "ToDcmtkBridge.h" |
24 #include "DicomIntegerPixelAccessor.h" | 27 #include "DicomIntegerPixelAccessor.h" |
25 #include "../Core/OrthancException.h" | 28 #include "../Core/OrthancException.h" |
26 #include "../Core/PngWriter.h" | 29 #include "../Core/PngWriter.h" |
27 #include "../Core/DicomFormat/DicomString.h" | 30 #include "../Core/DicomFormat/DicomString.h" |
28 #include "../Core/DicomFormat/DicomNullValue.h" | 31 #include "../Core/DicomFormat/DicomNullValue.h" |
32 | |
33 #include <limits> | |
29 | 34 |
30 #include <boost/locale.hpp> | 35 #include <boost/locale.hpp> |
31 #include <boost/lexical_cast.hpp> | 36 #include <boost/lexical_cast.hpp> |
32 | 37 |
33 #include <dcmtk/dcmdata/dcdicent.h> | 38 #include <dcmtk/dcmdata/dcdicent.h> |
420 for (unsigned int y = 0; y < accessor.GetHeight(); y++) | 425 for (unsigned int y = 0; y < accessor.GetHeight(); y++) |
421 { | 426 { |
422 for (unsigned int x = 0; x < accessor.GetWidth(); x++, pixel++) | 427 for (unsigned int x = 0; x < accessor.GetWidth(); x++, pixel++) |
423 { | 428 { |
424 int32_t v = accessor.GetValue(x, y); | 429 int32_t v = accessor.GetValue(x, y); |
425 if (v < std::numeric_limits<T>::min()) | 430 if (v < typename std::numeric_limits<T>::min()) |
426 *pixel = std::numeric_limits<T>::min(); | 431 *pixel = std::numeric_limits<T>::min(); |
427 else if (v > std::numeric_limits<T>::max()) | 432 else if (v > std::numeric_limits<T>::max()) |
428 *pixel = std::numeric_limits<T>::max(); | 433 *pixel = std::numeric_limits<T>::max(); |
429 else | 434 else |
430 *pixel = static_cast<T>(v); | 435 *pixel = static_cast<T>(v); |