Hi Milad, - one way to optimize performance would be to write your own custom data class and then write a custom 3D mapper for it that handles the VTK objects more efficiently.
- you could try to upgrade to our new Qt4 based application, which uses a new map based data structure to store and retrieve objects (although it has not been optimized for performance with a large number of objects). - finally, you could try to get a DataTreeIterator (each functionality has one) and use that to add objects to the DataTree. See http://www.itk.org/Doxygen316/html/classitk_1_1TreeIteratorBase.html for how to add nodes using an TreeIterator Regards, Jochen ________________________________________ From: Milad Sadinam [[email protected]] Sent: Monday, November 16, 2009 2:49 PM Cc: '[email protected]' Subject: [mitk-users] Performance problem with CommonFunctionality::AddVtkMeshToDataTree() Dear all, I am developing a plug-in for mitk 0.12.2 (with QT 3) using VTK-5.2.1 and ITK-3.8.0. In my program I render rather simple objects (most are spheres and cubes) but the number of the objects is quite high (about several hundreds). Now, I encountered serious performance problems during data-loading and also during normal program running (as I often create and remove dynamically objects to be rendered). A typical way how I create a object for rendering looks like this: vtkSphereSource* sphere = vtkSphereSource::New(); CommonFunctionality::AddVtkMeshToDataTree(sphere->GetOutput(), this->GetDataTreeIterator(), "node-name"); Running a profiler showed me that CommonFunctionality::AddVtkMeshToDataTree() is the bottleneck of my program. I went with the profiler deeper into that function and it seems to me that a great chunk of the time is consumed by tree-operations like itk::TreeNode<>::ChildPosition() or itk::SmartPointer<itk::TreeNode<void<mitk::DataTreeNode> > >::operator==<const void<mitk::DataTreeNode>*>(bool, mitk::DataTreeNode) const. I am not sure whether I interpret this correctly. Is the problem really the high number of objects and the from this resulting data-tree handling-code? Is there another (faster) way how I can create high number of objects? I am not sure what AddVtkMeshToDataTree() exactly does. What are important criterias to increase its performance? Many questions....hope you can help me with them :-) Milad Sadinam ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
