| 693 | } |
| 694 | |
| 695 | SliceState RenderWindowBridge::GetMxNSelectedSlice(const std::string& windowId) const |
| 696 | { |
| 697 | MxNSelectedSliceGetter getter; |
| 698 | StorageThreadDispatcherBase::Pointer dispatcher; |
| 699 | { |
| 700 | std::lock_guard<std::mutex> lock(m_Mutex); |
| 701 | getter = m_MxNSelectedSliceGetter; |
| 702 | dispatcher = m_Dispatcher.Lock(); |
| 703 | } |
| 704 | |
| 705 | if (!getter) |
| 706 | throw std::runtime_error("No MxN selected-slice getter is connected to the RenderWindowBridge"); |
| 707 | |
| 708 | SliceState result; |
| 709 | result.position.Fill(0.0); |
| 710 | Dispatch(dispatcher, [&]() { result = getter(windowId); }); |
| 711 | return result; |
| 712 | } |
| 713 | |
| 714 | void RenderWindowBridge::SetMxNSelectedSliceStep(const std::string& windowId, unsigned int step) const |
| 715 | { |