Mercurial > hg > orthanc
comparison OrthancFramework/Sources/Images/ImageAccessor.cpp @ 4273:0034f855c023
tuning log categories from command-line, and binary compat with orthanc framework 1.7.2
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 03 Nov 2020 12:24:50 +0100 |
parents | 2d5209153b32 |
children | 9279de56a405 |
comparison
equal
deleted
inserted
replaced
4272:1661544ea94d | 4273:0034f855c023 |
---|---|
88 } | 88 } |
89 | 89 |
90 target.AddChunk("], [ 3 " + boost::lexical_cast<std::string>(source.GetHeight()) + | 90 target.AddChunk("], [ 3 " + boost::lexical_cast<std::string>(source.GetHeight()) + |
91 " " + boost::lexical_cast<std::string>(source.GetWidth()) + " ]), [ 3 2 1 ]))"); | 91 " " + boost::lexical_cast<std::string>(source.GetWidth()) + " ]), [ 3 2 1 ]))"); |
92 } | 92 } |
93 | 93 |
94 | 94 |
95 void* ImageAccessor::GetBuffer() | 95 void* ImageAccessor::GetBuffer() |
96 { | 96 { |
97 if (readOnly_) | 97 if (readOnly_) |
98 { | 98 { |
291 throw OrthancException(ErrorCode_IncompatibleImageFormat); | 291 throw OrthancException(ErrorCode_IncompatibleImageFormat); |
292 } | 292 } |
293 | 293 |
294 format_ = format; | 294 format_ = format; |
295 } | 295 } |
296 | |
297 | |
298 #if ORTHANC_BUILDING_FRAMEWORK_LIBRARY == 1 | |
299 void* ImageAccessor::GetBuffer() const | |
300 { | |
301 return const_cast<ImageAccessor&>(*this).GetBuffer(); | |
302 } | |
303 | |
304 void* ImageAccessor::GetRow(unsigned int y) const | |
305 { | |
306 return const_cast<ImageAccessor&>(*this).GetRow(y); | |
307 } | |
308 #endif | |
296 } | 309 } |