Mercurial > hg > orthanc-webviewer
comparison Orthanc/Core/ImageFormats/ImageAccessor.cpp @ 69:fe8dab5c051f
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 07 Aug 2015 21:23:42 +0200 |
parents | 15acbf5e7545 |
children |
comparison
equal
deleted
inserted
replaced
68:45da32410346 | 69:fe8dab5c051f |
---|---|
31 | 31 |
32 | 32 |
33 #include "../PrecompiledHeaders.h" | 33 #include "../PrecompiledHeaders.h" |
34 #include "ImageAccessor.h" | 34 #include "ImageAccessor.h" |
35 | 35 |
36 #include "../Logging.h" | |
36 #include "../OrthancException.h" | 37 #include "../OrthancException.h" |
37 #include "../ChunkedBuffer.h" | 38 #include "../ChunkedBuffer.h" |
38 | 39 |
39 #include <stdint.h> | 40 #include <stdint.h> |
40 #include <cassert> | 41 #include <cassert> |
41 #include <boost/lexical_cast.hpp> | 42 #include <boost/lexical_cast.hpp> |
42 | 43 |
43 #if HAVE_GOOGLE_LOG == 1 | |
44 #include <glog/logging.h> | |
45 #endif | |
46 | 44 |
47 | 45 |
48 namespace Orthanc | 46 namespace Orthanc |
49 { | 47 { |
50 template <typename PixelType> | 48 template <typename PixelType> |
106 | 104 |
107 void* ImageAccessor::GetBuffer() const | 105 void* ImageAccessor::GetBuffer() const |
108 { | 106 { |
109 if (readOnly_) | 107 if (readOnly_) |
110 { | 108 { |
111 #if HAVE_GOOGLE_LOG == 1 | 109 #if ORTHANC_ENABLE_LOGGING == 1 |
112 LOG(ERROR) << "Trying to write on a read-only image"; | 110 LOG(ERROR) << "Trying to write on a read-only image"; |
113 #endif | 111 #endif |
114 | 112 |
115 throw OrthancException(ErrorCode_ReadOnly); | 113 throw OrthancException(ErrorCode_ReadOnly); |
116 } | 114 } |
134 | 132 |
135 void* ImageAccessor::GetRow(unsigned int y) const | 133 void* ImageAccessor::GetRow(unsigned int y) const |
136 { | 134 { |
137 if (readOnly_) | 135 if (readOnly_) |
138 { | 136 { |
139 #if HAVE_GOOGLE_LOG == 1 | 137 #if ORTHANC_ENABLE_LOGGING == 1 |
140 LOG(ERROR) << "Trying to write on a read-only image"; | 138 LOG(ERROR) << "Trying to write on a read-only image"; |
141 #endif | 139 #endif |
142 | 140 |
143 throw OrthancException(ErrorCode_ReadOnly); | 141 throw OrthancException(ErrorCode_ReadOnly); |
144 } | 142 } |