Mercurial > hg > orthanc-wsi
comparison Framework/Outputs/InMemoryTiledImage.cpp @ 154:32a94bbb7d05
merge
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 08 Oct 2018 12:12:39 +0200 |
parents | a0f9a3df1110 |
children | 6b8ccfc02051 |
comparison
equal
deleted
inserted
replaced
153:b798d200ac90 | 154:32a94bbb7d05 |
---|---|
115 boost::mutex::scoped_lock lock(mutex_); | 115 boost::mutex::scoped_lock lock(mutex_); |
116 | 116 |
117 Tiles::const_iterator it = tiles_.find(std::make_pair(tileX, tileY)); | 117 Tiles::const_iterator it = tiles_.find(std::make_pair(tileX, tileY)); |
118 if (it != tiles_.end()) | 118 if (it != tiles_.end()) |
119 { | 119 { |
120 return new Orthanc::ImageAccessor(*it->second); | 120 std::auto_ptr<Orthanc::ImageAccessor> result(new Orthanc::ImageAccessor); |
121 it->second->GetReadOnlyAccessor(*result); | |
122 return result.release(); | |
121 } | 123 } |
122 else | 124 else |
123 { | 125 { |
124 LOG(ERROR) << "The following tile has not been set: " << tileX << "," << tileY; | 126 LOG(ERROR) << "The following tile has not been set: " << tileX << "," << tileY; |
125 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); | 127 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); |