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

Somesh someshsandbox at gmail.com
Wed Sep 24 11:39:55 EDT 2014


Thanks David,
That fixed it :)

-Somesh

On Wed, Sep 24, 2014 at 11:30 AM, David Gobbi <david.gobbi at gmail.com> wrote:

> 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:
>
> actor->InterpolateOff();
>
> In VTK 6, you can have even more control via the Property and the Mapper
> for the image:
>
> actor->GetProperty()->SetInterpolationTypeToNearest();
> actor->GetMapper()->BorderOn();
>
>  - 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140924/9d67849a/attachment.html>


More information about the vtkusers mailing list