Hi Ingmar, I think our basic question is a bit misunderstood here.
We use the RequestUpdateAll function to update ONLY the windows with 3D mappers, hence the three render windows. The RequestUpdateAll function is called every 20 milliseconds (approximately). This results in a frame rate of approximately 20 frames. HOWEVER, if forced using a vtkRenderWindowInteractor with a Mouse Interaction style, the render windows get refreshed with a frame rate above 40 fps, which is significantly higher! Could you maybe let us know why this might be happening? Thanks! Yashodhan ----- Original Message ----- From: "Ingmar Wegner" <[email protected]> To: "Jochen Neuhaus" <[email protected]>, "Keshav Chintamani" <[email protected]>, "Alexander Seitel" <[email protected]> Cc: "[email protected]" <[email protected]>, "Marco Nolden" <[email protected]> Sent: Thursday, 26 May, 2011 5:07:53 PM Subject: Re: [mitk-users] Very low frame rates observed Hi Keshav, you should update the renderwindows of your interest only, so left and right HMD and Visualizer, if it is to be shown on a separate Display. Calling RequestUpdateAll causes all renderwindows to be updated and each renderwindow costs time to render. Next tuning area is interaction. If you have Interactors or Listeners unnecessarily activated, then deactivate them. Updating each of the three IGT sink filter also causes tree times an update on NDIPolarisSpectra. This could also be optimized, as far as I see (Alex?). Best Regards, Ingmar Von: Neuhaus, Jochen Gesendet: Donnerstag, 26. Mai 2011 16:33 An: 'Keshav Chintamani'; Seitel, Alexander Cc: '[email protected]'; Wegner, Ingmar; Nolden, Marco Betreff: AW: AW: [mitk-users] Very low frame rates observed Hi Keshav, 2D rendering is quite slow in MITK, especially when the scene contains 3D surfaces. You could try to update only the 3D renderwindow(s): mitk::RenderingManager::GetInstance()->RequestUpdate(this->GetActiveStdMultiWidget()->GetRenderWindow4()->GetRenderWindow()); This should improve the frame rate compared to a RequestUpdateAll() call. Regards, Jochen Von: Keshav Chintamani [mailto:[email protected]] Gesendet: Donnerstag, 26. Mai 2011 16:24 An: Seitel, Alexander Cc: [email protected]; Wegner, Ingmar; Neuhaus, Jochen; Nolden, Marco Betreff: Re: AW: [mitk-users] Very low frame rates observed Hi Alex, Thanks for the quick reply! In our 16 ms timed function call, we do have a RequestUpdateAll(). But removing it results in no rendering or update of the graphics objects. As part of the requirements we need to update the renderers at 16ms. However this is impossible to achieve with the current implementation. When we use ForceImmediateUpdateAll(), it causes a crash. This probably because another process is also updating a renderer at the same time. Is there an alternative method of updating the renderers at a 60 hz frequency? Best, Keshav On 5/26/2011 3:32 PM, Seitel, Alexander wrote: Hi Keshav, your IGT-pipeline initialization looks fine. Perhaps you should try to call Update() only once on the TrackingDeviceSource associated to the NDI Polaris instead of calling it for every filter. Do you also repeatedly update the rendering process with e.g. RequestUpdateAll()? Try to minimize those update calls as they will result in triggering the whole IGT-Pipeline / Rendering mechanism. Please let us know if you have any success with this. Best regards, Alex Von: Keshav Chintamani [ mailto:[email protected] ] Gesendet: Donnerstag, 26. Mai 2011 14:16 An: [email protected] Cc: Wegner, Ingmar; Neuhaus, Jochen; Nolden, Marco Betreff: [mitk-users] Very low frame rates observed Hello MITK users, We are using the filters in the mitkIGT module for an head mounted display based augmented reality application and have some concerns regarding the filter pipelines. In particular, the frame rates obtained during rendering is very low. We use a NDI Polaris spectra with 5 rigid bodies. Essentially, there are three filter objects: mitk::NavigationDataObjectVisualizationFilter::Pointer m_Visualizer mitk::CameraVisualization::Pointer m_LeftEye mitk::CameraVisualization::Pointer m_RightEye which are initialized once and passed the required parameters: ----------------------------------------------------------------------------- //Create instances of camera visualizers for left and right HMDs m_TrackingManager->m_CameraVisualizerLeftHMD = mitk::CameraVisualization::New(); m_TrackingManager->m_CameraVisualizerRightHMD =mitk::CameraVisualization::New(); //set Renderer m_TrackingManager->m_CameraVisualizerLeftHMD->SetRenderer(mitk::BaseRenderer::GetInstance(leftWin->GetRenderWindow()->GetRenderWindow())); m_TrackingManager->m_CameraVisualizerRightHMD->SetRenderer(mitk::BaseRenderer::GetInstance(rightWin->GetRenderWindow()->GetRenderWindow())); //set viewing direction mitk::Vector3D viewVector; mitk::FillVector3D( viewVector, 0.0, 0.0, -1.0 ); m_TrackingManager->m_CameraVisualizerLeftHMD->SetDirectionOfProjectionInToolCoordinates(viewVector); m_TrackingManager->m_CameraVisualizerRightHMD->SetDirectionOfProjectionInToolCoordinates(viewVector); //set view up vector mitk::Vector3D upVector; //mitk::FillVector3D( upVector, -1.0, 0.0, 0.0 ); mitk::FillVector3D( upVector, 0.0, 1.0, 0.0 ); m_TrackingManager->m_CameraVisualizerLeftHMD->SetViewUpInToolCoordinates(upVector); m_TrackingManager->m_CameraVisualizerLeftHMD->SetViewAngle(50); m_TrackingManager->m_CameraVisualizerLeftHMD->SetFocalLength(500); m_TrackingManager->m_CameraVisualizerRightHMD->SetViewUpInToolCoordinates(upVector); m_TrackingManager->m_CameraVisualizerRightHMD->SetViewAngle(50); m_TrackingManager->m_CameraVisualizerRightHMD->SetFocalLength(500); m_TrackingManager->m_Visualizer->SetInput(i, m_TrackingManager->GetNavDataFromIndex(i)); // set input for visualization filter m_TrackingManager->GetToolNameFromIndex(i); mitk::DataNode::Pointer toolrepresentationNode = m_TrackingManager->CreateGizmoRGBNode(toolName.c_str()); pDataStorage->Add(toolrepresentationNode); m_TrackingManager->m_Visualizer->SetRepresentationObject(i, toolrepresentationNode->GetData()); // set instrument nodes as baseData for visualisation filter ----------------------------------------------------------------------------- m_Visualizer updates the 6 polydata corresponding to each tool in the multi-widget 3D renderwindow m_LeftEye updates the HMD left eye viewpoint in a QMITKRenderWindow m_RightEye updates the HMD right eye viewpoint in a different QMITKRenderWindow. A figure describing our filter update and a code snippet is attached. // NavigationDataFiltersUpdate() is called by a Qt signal-slot on a timer update every 50 ms void CamdassTrackingManager::NavigationDataFiltersUpdate() { if(m_NDITrackingDevice.IsNull()) { return; } if (m_Visualizer.IsNull()) return; m_Visualizer->Update(); if(m_CameraVisualizerLeftHMD.IsNotNull() && m_CameraVisualizerRightHMD.IsNotNull()) { m_CameraVisualizerLeftHMD->Update(); m_CameraVisualizerRightHMD->Update(); } } Every 50ms, these filters are updated using the ->Update() call. 1. When the tracking is initialized, using FRAPS we see a very low frame rate of 3 to 20 fps on the renderwindows 2. When the tracking is initialized, using the mouse interactor (rotating the view) on the renderwindow raises the frame rate slightly 3. However when the tracking pipeline is not initialized, and we use the mouse to rotate the 3D renderwindow, we get a frame rate of 56-60 hz Is there a reason for the rendering rate to drop so low in the QmitkRenderWindows with the tracking running? And is calling Update() on the filters the correct way to push/pull data from the NDI device? Any help to rectify this issue is welcome! Regards, Keshav -- Keshav Chintamani, Systems Engineer Space Applications Services NV Leuvensesteenweg 325 1932 Zaventem Belgium Tel: +32 2 721 54 84 Fax: +32 2 721 54 44 URL: http://www.spaceapplications.com -- Keshav Chintamani, Systems Engineer Space Applications Services NV Leuvensesteenweg 325 1932 Zaventem Belgium Tel: +32 2 721 54 84 Fax: +32 2 721 54 44 URL: http://www.spaceapplications.com ------------------------------------------------------------------------------ vRanger cuts backup time in half-while increasing security. With the market-leading solution for virtual backup and recovery, you get blazing-fast, flexible, and affordable data protection. Download your free trial now. http://p.sf.net/sfu/quest-d2dcopy1 _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users -- Yashodhan Nevatia Systems Engineer Space Applications Services Leuvensesteenweg 325 B-1932 Zaventem Belgium Tel: +32 (0)2-721.54.84 Fax: +32 (0)2-721.54.44 URL: www.spaceapplications.com ------------------------------------------------------------------------------ vRanger cuts backup time in half-while increasing security. With the market-leading solution for virtual backup and recovery, you get blazing-fast, flexible, and affordable data protection. Download your free trial now. http://p.sf.net/sfu/quest-d2dcopy1 _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
