MCPcopy Create free account
hub / github.com/MITK/MITK / GetMxNSelectedSlice

Method GetMxNSelectedSlice

Modules/RESTAPI/src/mitkRenderWindowBridge.cpp:695–712  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

693}
694
695SliceState 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
714void RenderWindowBridge::SetMxNSelectedSliceStep(const std::string& windowId, unsigned int step) const
715{

Calls 3

DispatchFunction · 0.85
LockMethod · 0.45
FillMethod · 0.45