Hi Alex, The input for the two CameraVisualization filters are position data (an NDIDataSource object i believe). We had initially clubbed the two filters togethor, however the need to operate on separate Camera objects, and we thought it would be easier to create another instance rather than extend the methods.
However, we tried without any of the CameraVisualization filters, that is just the Visualization filter object (disabling the other two render windows) and the same effects were noticed! Best regards, Yashodhan ----- Original Message ----- From: "Alexander Seitel" <[email protected]> To: "Keshav Chintamani" <[email protected]>, "Jochen Neuhaus" <[email protected]> Cc: "[email protected]" <[email protected]>, "Ingmar Wegner" <[email protected]>, "Marco Nolden" <[email protected]>, "Yashodhan Nevatia" <[email protected]> Sent: Thursday, 26 May, 2011 7:24:41 PM Subject: AW: AW: AW: [mitk-users] Very low frame rates observed Hi Keshav, I was just wondering what are the current input of your CameraVisualization filters for „RightEye“ and „LeftEye“? I realized that in the current implementation only input 0 is taken for setting the camera according to the input navigation datas. You could extend the CameraVisualization class by a member defining the actual input taken for camera visualization (default=0) and then combine the filters sequentially to avoid multiple Update() calls: VisualizationFilter->CameraVisualization1->CameraVisualization2. CameraVisualization2->Update() should then result in an update of the whole pipeline. Regards, Alex Von: Keshav Chintamani [mailto:[email protected]] Gesendet: Donnerstag, 26. Mai 2011 16:46 An: Neuhaus, Jochen Cc: Seitel, Alexander; '[email protected]'; Wegner, Ingmar; Nolden, Marco; Yashodhan Nevatia Betreff: Re: AW: AW: [mitk-users] Very low frame rates observed Hi Alex, We did an update on the TrackingDeviceSource object alone, but there was nothing rendered. I assume that as this object is at the start of the pipeline, it does not propogate to the renderers. We removed Update() calls on the two camera visualizer filters and called update only on the mitk::NavigationDataObjectVisualizationFilter (m_Visualizer) object. That improved the frame rate, but now we have no HMD rendering Hi Jochen: We have been updating only the 3D renderwindow so far. Without that call, nothing renders. Best, Keshav On 5/26/2011 4:33 PM, Neuhaus, Jochen wrote: 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 -- 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 -- 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
