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

Method GetStdMultiCamera

Modules/RESTAPI/src/mitkRenderWindowBridge.cpp:527–546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

525}
526
527CameraState RenderWindowBridge::GetStdMultiCamera(const std::string& windowName) const
528{
529 StdMultiCameraGetter getter;
530 StorageThreadDispatcherBase::Pointer dispatcher;
531 {
532 std::lock_guard<std::mutex> lock(m_Mutex);
533 getter = m_StdMultiCameraGetter;
534 dispatcher = m_Dispatcher.Lock();
535 }
536
537 if (!getter)
538 throw std::runtime_error("No StdMulti camera getter is connected to the RenderWindowBridge");
539
540 CameraState result;
541 result.position.Fill(0.0);
542 result.focalPoint.Fill(0.0);
543 result.viewUp.Fill(0.0);
544 Dispatch(dispatcher, [&]() { result = getter(windowName); });
545 return result;
546}
547
548void RenderWindowBridge::SetStdMultiCamera(const std::string& windowName, const CameraPatch& patch) const
549{

Calls 3

DispatchFunction · 0.85
LockMethod · 0.45
FillMethod · 0.45