comparison Core/ImageFormats/ImageAccessor.cpp @ 1491:e460341872dc

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 04 Aug 2015 14:14:17 +0200
parents f967bdf8534e
children
comparison
equal deleted inserted replaced
1490:596927722403 1491:e460341872dc
104 104
105 void* ImageAccessor::GetBuffer() const 105 void* ImageAccessor::GetBuffer() const
106 { 106 {
107 if (readOnly_) 107 if (readOnly_)
108 { 108 {
109 #if ORTHANC_ENABLE_LOGGING == 1
109 LOG(ERROR) << "Trying to write on a read-only image"; 110 LOG(ERROR) << "Trying to write on a read-only image";
111 #endif
112
110 throw OrthancException(ErrorCode_ReadOnly); 113 throw OrthancException(ErrorCode_ReadOnly);
111 } 114 }
112 115
113 return buffer_; 116 return buffer_;
114 } 117 }
129 132
130 void* ImageAccessor::GetRow(unsigned int y) const 133 void* ImageAccessor::GetRow(unsigned int y) const
131 { 134 {
132 if (readOnly_) 135 if (readOnly_)
133 { 136 {
137 #if ORTHANC_ENABLE_LOGGING == 1
134 LOG(ERROR) << "Trying to write on a read-only image"; 138 LOG(ERROR) << "Trying to write on a read-only image";
139 #endif
140
135 throw OrthancException(ErrorCode_ReadOnly); 141 throw OrthancException(ErrorCode_ReadOnly);
136 } 142 }
137 143
138 if (buffer_ != NULL) 144 if (buffer_ != NULL)
139 { 145 {