Skip to content

Fix out of bounds cell location searchs in VolumeRendererStructured

Manish Mathai requested to merge mmathai/vtk-m:volume-renderer-oob-fix into master

RectilinearLocator::LocateCell and UniformLocator::LocateCell assume that the point is inside the bounds of the cell set but may return a cell location that does not exist, i.e. cell location that is outside of the bounds of the cell set, due to errors from floating-point operations.

This fix, given the assumption above, bounds the calculated cell location to within the cell set by capping the indices to within the limits. This fixes the cause of the crash in Ascent that is noted at https://github.com/Alpine-DAV/ascent/issues/825

Backport: release

Edited by Vicente Bolea

Merge request reports