[vtkusers] Undesirable smoothing/anti-aliasing when displaying image

David Gobbi david.gobbi at gmail.com
Wed Sep 24 11:30:44 EDT 2014

Hi Somesh,

It's definitely not a bug.  Interpolation is turned on by default, in order to
reduce a certain artifact known as "pixels" that can occur when displaying
a uniformly sampled data set ;)

In VTK 5, use this method:


In VTK 6, you can have even more control via the Property and the Mapper
for the image:


 - David

On Wed, Sep 24, 2014 at 9:12 AM, Somesh <someshsandbox at gmail.com> wrote:
> Hi,
> I am displaying an image with sharp boundaries in VTK.
> However, the boundaries seem to have some kind of smoothing/anti-aliasing
> effect.
> I have turned of all smoothing feature in the render window, but I still see
> this effect.
> Viewing the image in ITK-SNAP shows sharp boundaries, which is consistent
> with the image.
> I have created a test program to illustrate this. The code and data can be
> found @
> https://github.com/someshSandbox/vtkImageSmoothingBug
> The following screenshots should illustrate the problem clearly :
> https://github.com/someshSandbox/vtkImageSmoothingBug/tree/master/screenshots
> Thanks,
> Somesh

More information about the vtkusers mailing list