Mercurial > hg > orthanc-wsi
comparison Framework/Outputs/InMemoryTiledImage.cpp @ 228:c6e7dda9ac14
more reuse of Orthanc::ImageProcessing() toolbox
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 13 Jan 2021 17:21:31 +0100 |
parents | 1e864138f0da |
children | 49f647ed1b4c |
comparison
equal
deleted
inserted
replaced
227:aff61c449308 | 228:c6e7dda9ac14 |
---|---|
25 #include "../ImageToolbox.h" | 25 #include "../ImageToolbox.h" |
26 | 26 |
27 #include <Compatibility.h> // For std::unique_ptr | 27 #include <Compatibility.h> // For std::unique_ptr |
28 #include <Logging.h> | 28 #include <Logging.h> |
29 #include <OrthancException.h> | 29 #include <OrthancException.h> |
30 #include <Images/Image.h> | |
31 | |
30 | 32 |
31 namespace OrthancWSI | 33 namespace OrthancWSI |
32 { | 34 { |
33 static void CheckLevel(unsigned int level) | 35 static void CheckLevel(unsigned int level) |
34 { | 36 { |
162 boost::mutex::scoped_lock lock(mutex_); | 164 boost::mutex::scoped_lock lock(mutex_); |
163 | 165 |
164 Tiles::iterator it = tiles_.find(std::make_pair(tileX, tileY)); | 166 Tiles::iterator it = tiles_.find(std::make_pair(tileX, tileY)); |
165 if (it == tiles_.end()) | 167 if (it == tiles_.end()) |
166 { | 168 { |
167 tiles_[std::make_pair(tileX, tileY)] = ImageToolbox::Clone(tile); | 169 tiles_[std::make_pair(tileX, tileY)] = Orthanc::Image::Clone(tile); |
168 } | 170 } |
169 else | 171 else |
170 { | 172 { |
171 if (it->second) | 173 if (it->second) |
172 { | 174 { |
173 delete it->second; | 175 delete it->second; |
174 } | 176 } |
175 | 177 |
176 it->second = ImageToolbox::Clone(tile); | 178 it->second = Orthanc::Image::Clone(tile); |
177 } | 179 } |
178 } | 180 } |
179 } | 181 } |
180 } | 182 } |