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

Method PlaybackInteraction

Modules/Core/TestingHelper/src/mitkInteractionTestHelper.cpp:202–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202void 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
241void mitk::InteractionTestHelper::LoadInteraction()
242{

Callers 6

RunTestMethod · 0.80
RunTestWithParametersMethod · 0.80
AddPointInteractionMethod · 0.80
PlayInteractionMethod · 0.80

Calls 15

LoadInteractionMethod · 0.95
PrepareRenderMethod · 0.80
ProcessEventMethod · 0.80
GetSenderMethod · 0.80
atMethod · 0.80
GetInteractorMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
GetRendererMethod · 0.45
RenderMethod · 0.45

Tested by

no test coverage detected