Mercurial > hg > orthanc-stone
diff Framework/Layers/OrthancFrameLayerSource.cpp @ 86:02c3a7a4938f wasm
removing of the Start() mechanism
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 26 May 2017 13:42:50 +0200 |
parents | bd48431ac285 |
children | f244018a4e4b |
line wrap: on
line diff
--- a/Framework/Layers/OrthancFrameLayerSource.cpp Fri May 26 12:20:26 2017 +0200 +++ b/Framework/Layers/OrthancFrameLayerSource.cpp Fri May 26 13:42:50 2017 +0200 @@ -91,22 +91,12 @@ loader_(*this, orthanc), observer2_(NULL) { + loader_.ScheduleLoadInstance(instanceId_, frame_); } - void OrthancFrameLayerSource::StartInternal() - { - loader_.ScheduleLoadInstance(instanceId_, frame_); - } - - void OrthancFrameLayerSource::SetObserver(IVolumeSlicesObserver& observer) { - if (IsStarted()) - { - throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); - } - if (observer2_ == NULL) { observer2_ = &observer; @@ -163,14 +153,16 @@ { size_t index; - if (loader_.IsGeometryReady() && - loader_.LookupSlice(index, viewportSlice)) + if (loader_.IsGeometryReady()) { - loader_.ScheduleLoadSliceImage(index); - } - else - { - LayerSourceBase::NotifyLayerError(viewportSlice); + if (loader_.LookupSlice(index, viewportSlice)) + { + loader_.ScheduleLoadSliceImage(index); + } + else + { + LayerSourceBase::NotifyLayerError(viewportSlice); + } } } }