Hello, I am seeking suggestions for additional places where this new iterator could be beneficial.
I have just merged an new image iterator, which has given up to 3.5x ( VS8 in 256x256 image ) performance improvement in basic binary functor image filters such as the AddImageFilter. https://github.com/Kitware/ITK/commit/ab29cc59095d7448a1dbf1e09f96947036d2b118 The way to use the new iterator is basically like this: while ( !inputIt1.IsAtEnd() ) { while ( !inputIt1.IsAtEndOfLine() ) { outputIt.Set( m_Functor( inputIt1.Get(), inputIt2.Get() ) ); ++inputIt2; ++inputIt1; ++outputIt; } inputIt1.NextLine(); inputIt2.NextLine(); outputIt.NextLine(); progress.CompletedPixel(); } The performance gain is from the removal of any conditionals in the inner loop which enable additional compiler optimizations and only updating the progress on a per line basis. If anyone knows of the filters with tight looks which could benefit from this new iterator please let me know! Thanks, Brad _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://www.itk.org/mailman/listinfo/insight-developers
