| 127 | } |
| 128 | |
| 129 | void QmitkStdMultiWidget::InitializeViews(const mitk::TimeGeometry* geometry, bool resetCamera) |
| 130 | { |
| 131 | auto* renderingManager = mitk::RenderingManager::GetInstance(); |
| 132 | mitk::Point3D currentPosition = mitk::Point3D(); |
| 133 | unsigned int imageTimeStep = 0; |
| 134 | if (!resetCamera) |
| 135 | { |
| 136 | // store the current position to set it again later, if the camera should not be reset |
| 137 | currentPosition = this->GetSelectedPosition(""); |
| 138 | |
| 139 | // store the current time step to set it again later, if the camera should not be reset |
| 140 | const mitk::TimePointType currentTimePoint = renderingManager->GetTimeNavigationController()->GetSelectedTimePoint(); |
| 141 | if (geometry->IsValidTimePoint(currentTimePoint)) |
| 142 | { |
| 143 | imageTimeStep = geometry->TimePointToTimeStep(currentTimePoint); |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | // initialize render windows |
| 148 | renderingManager->InitializeViews(geometry, mitk::RenderingManager::REQUEST_UPDATE_ALL, resetCamera); |
| 149 | |
| 150 | if (!resetCamera) |
| 151 | { |
| 152 | this->SetSelectedPosition(currentPosition, ""); |
| 153 | renderingManager->GetTimeNavigationController()->GetStepper()->SetPos(imageTimeStep); |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | void QmitkStdMultiWidget::SetInteractionReferenceGeometry(const mitk::TimeGeometry* /*referenceGeometry*/) |
| 158 | { |