<div dir="ltr">Thanks David,<div>That fixed it :)</div><div><br></div><div>-Somesh </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 24, 2014 at 11:30 AM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Somesh,<br>
<br>
It's definitely not a bug.  Interpolation is turned on by default, in order to<br>
reduce a certain artifact known as "pixels" that can occur when displaying<br>
a uniformly sampled data set ;)<br>
<br>
In VTK 5, use this method:<br>
<br>
actor->InterpolateOff();<br>
<br>
In VTK 6, you can have even more control via the Property and the Mapper<br>
for the image:<br>
<br>
actor->GetProperty()->SetInterpolationTypeToNearest();<br>
actor->GetMapper()->BorderOn();<br>
<br>
 - David<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Wed, Sep 24, 2014 at 9:12 AM, Somesh <<a href="mailto:someshsandbox@gmail.com">someshsandbox@gmail.com</a>> wrote:<br>
> Hi,<br>
> I am displaying an image with sharp boundaries in VTK.<br>
> However, the boundaries seem to have some kind of smoothing/anti-aliasing<br>
> effect.<br>
> I have turned of all smoothing feature in the render window, but I still see<br>
> this effect.<br>
> Viewing the image in ITK-SNAP shows sharp boundaries, which is consistent<br>
> with the image.<br>
><br>
> I have created a test program to illustrate this. The code and data can be<br>
> found @<br>
><br>
> <a href="https://github.com/someshSandbox/vtkImageSmoothingBug" target="_blank">https://github.com/someshSandbox/vtkImageSmoothingBug</a><br>
><br>
> The following screenshots should illustrate the problem clearly :<br>
> <a href="https://github.com/someshSandbox/vtkImageSmoothingBug/tree/master/screenshots" target="_blank">https://github.com/someshSandbox/vtkImageSmoothingBug/tree/master/screenshots</a><br>
><br>
><br>
> Thanks,<br>
> Somesh<br>
</div></div></blockquote></div><br></div>