Mercurial > hg > orthanc-stone
comparison Framework/Toolbox/OrthancSlicesLoader.cpp @ 268:5bd4161bf11b am-2
removed constness of the observable when emitting a message
author | am@osimis.io |
---|---|
date | Wed, 22 Aug 2018 15:08:15 +0200 |
parents | 89d02de83c03 |
children | 3897f9f28cfa |
comparison
equal
deleted
inserted
replaced
267:89d02de83c03 | 268:5bd4161bf11b |
---|---|
269 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); | 269 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); |
270 } | 270 } |
271 } | 271 } |
272 }; | 272 }; |
273 | 273 |
274 void OrthancSlicesLoader::HandleMessage(const IObservable& from, const IMessage& message) | 274 void OrthancSlicesLoader::HandleMessage(IObservable& from, const IMessage& message) |
275 { | 275 { |
276 // forward messages to its own observers | 276 // forward messages to its own observers |
277 IObservable::broker_.EmitMessage(from, IObservable::observers_, message); | 277 IObservable::broker_.EmitMessage(from, IObservable::observers_, message); |
278 } | 278 } |
279 | 279 |
280 | 280 |
281 void OrthancSlicesLoader::NotifySliceImageSuccess(const Operation& operation, | 281 void OrthancSlicesLoader::NotifySliceImageSuccess(const Operation& operation, |
282 std::auto_ptr<Orthanc::ImageAccessor>& image) const | 282 std::auto_ptr<Orthanc::ImageAccessor>& image) |
283 { | 283 { |
284 if (image.get() == NULL) | 284 if (image.get() == NULL) |
285 { | 285 { |
286 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer); | 286 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer); |
287 } | 287 } |
291 EmitMessage(msg); | 291 EmitMessage(msg); |
292 } | 292 } |
293 } | 293 } |
294 | 294 |
295 | 295 |
296 void OrthancSlicesLoader::NotifySliceImageError(const Operation& operation) const | 296 void OrthancSlicesLoader::NotifySliceImageError(const Operation& operation) |
297 { | 297 { |
298 OrthancSlicesLoader::SliceImageErrorMessage msg(operation.GetSliceIndex(), operation.GetSlice(), operation.GetQuality()); | 298 OrthancSlicesLoader::SliceImageErrorMessage msg(operation.GetSliceIndex(), operation.GetSlice(), operation.GetQuality()); |
299 EmitMessage(msg); | 299 EmitMessage(msg); |
300 } | 300 } |
301 | 301 |