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
------------------------------------------------------------------------------
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