Mercurial > hg > orthanc-stone
comparison Framework/SmartLoader.cpp @ 377:8eb4fe74000f
refactoring
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 05 Nov 2018 16:18:27 +0100 |
parents | c34784e5f299 |
children | 814fa32e2fcc |
comparison
equal
deleted
inserted
replaced
376:70256a53ff21 | 377:8eb4fe74000f |
---|---|
204 // } | 204 // } |
205 | 205 |
206 | 206 |
207 void SmartLoader::OnLayerGeometryReady(const ILayerSource::GeometryReadyMessage& message) | 207 void SmartLoader::OnLayerGeometryReady(const ILayerSource::GeometryReadyMessage& message) |
208 { | 208 { |
209 OrthancFrameLayerSource& source = dynamic_cast<OrthancFrameLayerSource&>(message.origin_); | 209 OrthancFrameLayerSource& source = dynamic_cast<OrthancFrameLayerSource&>(message.GetOrigin()); |
210 | 210 |
211 // save/replace the slice in cache | 211 // save/replace the slice in cache |
212 const Slice& slice = source.GetSlice(0); // TODO handle GetSliceCount() | 212 const Slice& slice = source.GetSlice(0); // TODO handle GetSliceCount() |
213 std::string sliceKeyId = (slice.GetOrthancInstanceId() + ":" + | 213 std::string sliceKeyId = (slice.GetOrthancInstanceId() + ":" + |
214 boost::lexical_cast<std::string>(slice.GetFrame())); | 214 boost::lexical_cast<std::string>(slice.GetFrame())); |
227 } | 227 } |
228 | 228 |
229 | 229 |
230 void SmartLoader::OnImageReady(const ILayerSource::ImageReadyMessage& message) | 230 void SmartLoader::OnImageReady(const ILayerSource::ImageReadyMessage& message) |
231 { | 231 { |
232 OrthancFrameLayerSource& source = dynamic_cast<OrthancFrameLayerSource&>(message.origin_); | 232 OrthancFrameLayerSource& source = dynamic_cast<OrthancFrameLayerSource&>(message.GetOrigin()); |
233 | 233 |
234 // save/replace the slice in cache | 234 // save/replace the slice in cache |
235 const Slice& slice = source.GetSlice(0); // TODO handle GetSliceCount() ? | 235 const Slice& slice = source.GetSlice(0); // TODO handle GetSliceCount() ? |
236 std::string sliceKeyId = (slice.GetOrthancInstanceId() + ":" + | 236 std::string sliceKeyId = (slice.GetOrthancInstanceId() + ":" + |
237 boost::lexical_cast<std::string>(slice.GetFrame())); | 237 boost::lexical_cast<std::string>(slice.GetFrame())); |
251 } | 251 } |
252 | 252 |
253 | 253 |
254 void SmartLoader::OnLayerReady(const ILayerSource::LayerReadyMessage& message) | 254 void SmartLoader::OnLayerReady(const ILayerSource::LayerReadyMessage& message) |
255 { | 255 { |
256 OrthancFrameLayerSource& source = dynamic_cast<OrthancFrameLayerSource&>(message.origin_); | 256 OrthancFrameLayerSource& source = dynamic_cast<OrthancFrameLayerSource&>(message.GetOrigin()); |
257 const Slice& slice = source.GetSlice(0); // TODO handle GetSliceCount() ? | 257 const Slice& slice = source.GetSlice(0); // TODO handle GetSliceCount() ? |
258 std::string sliceKeyId = (slice.GetOrthancInstanceId() + ":" + | 258 std::string sliceKeyId = (slice.GetOrthancInstanceId() + ":" + |
259 boost::lexical_cast<std::string>(slice.GetFrame())); | 259 boost::lexical_cast<std::string>(slice.GetFrame())); |
260 | 260 |
261 LOG(WARNING) << "Layer ready: " << sliceKeyId; | 261 LOG(WARNING) << "Layer ready: " << sliceKeyId; |