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

Method GetMxNSelectedPosition

Modules/RESTAPI/src/mitkRenderWindowBridge.cpp:730–747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

728}
729
730SelectedPositionInfo RenderWindowBridge::GetMxNSelectedPosition(const std::string& windowId) const
731{
732 MxNSelectedPositionGetter getter;
733 StorageThreadDispatcherBase::Pointer dispatcher;
734 {
735 std::lock_guard<std::mutex> lock(m_Mutex);
736 getter = m_MxNSelectedPositionGetter;
737 dispatcher = m_Dispatcher.Lock();
738 }
739
740 if (!getter)
741 throw std::runtime_error("No MxN selected-position getter is connected to the RenderWindowBridge");
742
743 SelectedPositionInfo result;
744 result.position.Fill(0.0);
745 Dispatch(dispatcher, [&]() { result = getter(windowId); });
746 return result;
747}
748
749void RenderWindowBridge::SetMxNSelectedPosition(const std::string& windowId, const Point3D& position) const
750{

Calls 3

DispatchFunction · 0.85
LockMethod · 0.45
FillMethod · 0.45