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

Method GetMxNCamera

Modules/RESTAPI/src/mitkRenderWindowBridge.cpp:658–677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

656}
657
658CameraState RenderWindowBridge::GetMxNCamera(const std::string& windowId) const
659{
660 MxNCameraGetter getter;
661 StorageThreadDispatcherBase::Pointer dispatcher;
662 {
663 std::lock_guard<std::mutex> lock(m_Mutex);
664 getter = m_MxNCameraGetter;
665 dispatcher = m_Dispatcher.Lock();
666 }
667
668 if (!getter)
669 throw std::runtime_error("No MxN camera getter is connected to the RenderWindowBridge");
670
671 CameraState result;
672 result.position.Fill(0.0);
673 result.focalPoint.Fill(0.0);
674 result.viewUp.Fill(0.0);
675 Dispatch(dispatcher, [&]() { result = getter(windowId); });
676 return result;
677}
678
679void RenderWindowBridge::SetMxNCamera(const std::string& windowId, const CameraPatch& patch) const
680{

Calls 3

DispatchFunction · 0.85
LockMethod · 0.45
FillMethod · 0.45