Status: currently the (time)geometry are cloned a lot; e.g. in simple reinits of the rendering scenes (i.a. for bounding box checks, worldgeometry generation, slice navigator setup...). This has a significant impact (consuming 80% of cpu time on a simple reinit) on the performance and usablity when we start to work with a lot of dynamic data sets (many volumes -> timegeometry with a lot of geometries -> significant more cloning).
This should be optimized.
Following steps/ideas
- Time geometries should allow to just keep one internal 3D geometry, if the 3D geometries of all time steps are equal -> This is the case in most situations and it will save a lot of cloning in dynamic cases.
- To savely allow #1, we should improve const correctness in TimeGeometries. The 3D geometries should only be returned as const pointers. Otherwise we could get inconsistancy in conjunction with #1, if someone alters a geometry via pointer for a specific time point in a TimeGeometry that was homogenous till then.
- Check for unnecessary itkNewMacros instead if itkFactorylessNewMacros in this context.
- Check that the DICOM loader, when it assambles the TimeGeometry, also does it efficiently (not a new geometry for each frame, as long as they are equal, but only once for all time steps.