Skip to content

Backport 'reslicemapper-border' to release branch.

David Gobbi requested to merge dgobbi/vtk:backport-reslicemapper-17310 into release

When MultiSamples are used in VTK (which is the default on Windows and Linux), a thin border appeared at the edge of the image if the the image pixel values were not zero at the edge. The thin border is the result of the zero 'Background' value of vtkImageReslice. All of the 'Background' pixels produced by vtkImageReslice are supposed to map to beyond edges of the polygon used to render the image texture. However, MultiSamples causes the edge to be soft, and the coloring of these background pixels bleeds into the edge of the polygon.

The solution is to tell vtkImageReslice to add a bit more edge tolerance when clamping its interpolation coordinates. This moves the 'Background' beyond the edge of the polygon, so that these background pixels no longer bleed into view.

Resolves #17310 (closed)

Merge request reports