本文整理汇总了C++中BaseRenderer::GetSliceNavigationController方法的典型用法代码示例。如果您正苦于以下问题:C++ BaseRenderer::GetSliceNavigationController方法的具体用法?C++ BaseRenderer::GetSliceNavigationController怎么用?C++ BaseRenderer::GetSliceNavigationController使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseRenderer
的用法示例。
在下文中一共展示了BaseRenderer::GetSliceNavigationController方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ExecuteAction
//.........这里部分代码省略.........
if ( renderWindow != NULL )
{
renderWindowInteractor = renderWindow->GetInteractor();
if ( renderWindowInteractor != NULL )
{
currentVtkRenderer = renderWindowInteractor
->GetInteractorStyle()->GetCurrentRenderer();
if ( currentVtkRenderer != NULL )
{
camera = currentVtkRenderer->GetActiveCamera();
}
}
}
}
}
/*Each case must watch the type of the event!*/
switch (action->GetActionId())
{
case AcCHECKHOVERING:
{
QApplication::restoreOverrideCursor();
// Re-enable VTK interactor (may have been disabled previously)
if ( renderWindowInteractor != NULL )
{
renderWindowInteractor->Enable();
}
const DisplayPositionEvent *dpe =
dynamic_cast< const DisplayPositionEvent * >( stateEvent->GetEvent() );
// Check if we have a DisplayPositionEvent
if ( dpe != NULL )
{
// Check if an object is present at the current mouse position
DataNode *pickedNode = dpe->GetPickedObjectNode();
if ( pickedNode != m_DataNode )
{
// if(pickedNode == 0)
// MITK_INFO << "picked node is NULL, no hovering";
// else
// MITK_INFO << "wrong node: " << pickedNode;
this->HandleEvent( new StateEvent( EIDNOFIGUREHOVER ) );
ok = true;
break;
}
m_CurrentPickedPoint = dpe->GetWorldPosition();
m_CurrentPickedDisplayPoint = dpe->GetDisplayPosition();
QApplication::setOverrideCursor(Qt::UpArrowCursor);
this->HandleEvent( new StateEvent( EIDFIGUREHOVER ) );
}
ok = true;
break;
}
break;
// case AcSELECTPICKEDOBJECT:
// MITK_INFO << "FiberBundleInteractor AcSELECTPICKEDOBJECT";
// break;
// case AcDESELECTALL:
// MITK_INFO << "FiberBundleInteractor AcDESELECTALL";
// break;
case AcREMOVE:
{
MITK_INFO << "picking fiber at " << m_CurrentPickedPoint;
// QmitkStdMultiWidgetEditor::Pointer multiWidgetEditor;
// multiWidgetEditor->GetStdMultiWidget()->GetRenderWindow1()->GetRenderer()->GetSliceNavigationController()->SelectSliceByPoint(
// m_CurrentPickedPoint);
BaseRenderer* renderer = mitk::BaseRenderer::GetByName("stdmulti.widget1");
renderer->GetSliceNavigationController()->SelectSliceByPoint(
m_CurrentPickedPoint);
renderer = mitk::BaseRenderer::GetByName("stdmulti.widget2");
renderer->GetSliceNavigationController()->SelectSliceByPoint(
m_CurrentPickedPoint);
renderer = mitk::BaseRenderer::GetByName("stdmulti.widget3");
renderer->GetSliceNavigationController()->SelectSliceByPoint(
m_CurrentPickedPoint);
// mitk::RenderingManager::GetInstance()->RequestUpdateAll();
}
break;
default:
return Superclass::ExecuteAction( action, stateEvent );
}
return ok;
}