| 200 | } |
| 201 | |
| 202 | void mitk::InteractionTestHelper::PlaybackInteraction() |
| 203 | { |
| 204 | mitk::RenderingManager::GetInstance()->InitializeViewsByBoundingObjects(m_DataStorage); |
| 205 | // load events if not loaded yet |
| 206 | if (m_Events.empty()) |
| 207 | this->LoadInteraction(); |
| 208 | |
| 209 | auto it = m_RenderWindowList.begin(); |
| 210 | auto end = m_RenderWindowList.end(); |
| 211 | for (; it != end; ++it) |
| 212 | { |
| 213 | (*it)->GetRenderer()->PrepareRender(); |
| 214 | |
| 215 | (*it)->GetVtkRenderWindow()->Render(); |
| 216 | (*it)->GetVtkRenderWindow()->WaitForCompletion(); |
| 217 | } |
| 218 | mitk::RenderingManager::GetInstance()->InitializeViewsByBoundingObjects(m_DataStorage); |
| 219 | |
| 220 | it = m_RenderWindowList.begin(); |
| 221 | for (; it != end; ++it) |
| 222 | { |
| 223 | (*it)->GetVtkRenderWindow()->Render(); |
| 224 | (*it)->GetVtkRenderWindow()->WaitForCompletion(); |
| 225 | } |
| 226 | |
| 227 | // mitk::RenderingManager::GetInstance()->ForceImmediateUpdateAll(); |
| 228 | // playback all events in queue |
| 229 | for (unsigned long i = 0; i < m_Events.size(); ++i) |
| 230 | { |
| 231 | // let dispatcher of sending renderer process the event |
| 232 | m_Events.at(i)->GetSender()->GetDispatcher()->ProcessEvent(m_Events.at(i)); |
| 233 | } |
| 234 | if (false) |
| 235 | { |
| 236 | it--; |
| 237 | (*it)->GetVtkRenderWindow()->GetInteractor()->Start(); |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | void mitk::InteractionTestHelper::LoadInteraction() |
| 242 | { |
no test coverage detected