Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PERF: Remove
Image::GetPixel
calls from ImageGridSampler inner loop
itk::Image::GetPixel(const IndexType &) is rather expensive, as it has to compute the offset relative to the start of the pixel buffer. When having a 4096x4096 grid (no mask), it was observed that the duration of an ImageGridSampler::Update() went from slightly more than 0.20 second (before this commit) to slightly _less_ than 0.20 second (after this commit), using Visual C++ 2019, Release configuration.
- Loading branch information