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

Method GetSelectedPosition

Modules/RESTAPI/src/mitkRenderWindowBridge.cpp:415–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413}
414
415SelectedPositionInfo RenderWindowBridge::GetSelectedPosition() const
416{
417 PositionGetter getter;
418 StorageThreadDispatcherBase::Pointer dispatcher;
419 {
420 std::lock_guard<std::mutex> lock(m_Mutex);
421 getter = m_PositionGetter;
422 dispatcher = m_Dispatcher.Lock();
423 }
424
425 if (!getter)
426 throw std::runtime_error("No position getter is connected to the RenderWindowBridge");
427
428 SelectedPositionInfo result;
429 result.position.Fill(0.0);
430 Dispatch(dispatcher, [&]() { result = getter(); });
431 return result;
432}
433
434void RenderWindowBridge::SetSelectedPosition(const Point3D& pos) const
435{

Callers 1

Calls 3

DispatchFunction · 0.85
LockMethod · 0.45
FillMethod · 0.45

Tested by

no test coverage detected