Request for Changes-30: Faster resampling filter
- Author: Julien Michel (CNES)
- Submitted on 14.03.2016
- Adopted (+3,-0), merged
- Proposed target release : 5.4
- Link to a public git branch or pull request corresponding to the changes: https://git.orfeo-toolbox.org/otb.git/shortlog/refs/heads/grid-resampling
This RFC introduces a new fast and scalable filter when resampling an image in the same geometry (i.e. only origin, spacing and size change).
StreamingResampleImageFilter is a good filter when resampling images with complex transforms. It supports streaming and multithreading, however when using very simple transforms such as IdentityTransform, it is quite ineficient and does not scale up very well with the number of threads. The itk::ResampleImageFilter behave better in this case, but it does not support streaming. The proposed class is faster than the ITK one and scales up perfectly.
Classes and files
New otb::GridResampleImageFilter class in Filtering/ImageManipulation module :
Some tips used to speed-up things:
- This filter does not build and use instances of the Transform class
- Fill buffer is multithreaded
- No calls to the IsInside method, the region of computable pixels is computed beforehand
- Use of itk::ImageScanLineIterator
BundleToPerfectSensor and Superimpose applications have been updated to use the new filter in PHR mode. RigidTransformResample has been updated to use the new filter in Identiy mode.
There is a test comparing output of this new filter to the output of the itk::ResampleImageFilter with an Identity transform and the same parameters:
The test does not read or write any image, it is self-contained.
Extensive doxygen documentation of the class.
Branch mantis-1153 has been merged to the grid-resampling branch because it adds some new tests that needed to be updated.