[vtkusers] display vtkImageData with no interpolation

David Gobbi david.gobbi at gmail.com
Wed Jun 3 14:32:46 EDT 2015


If you display the images with nearest-neighbor interpolation, it should
give you the results that you want.  In my own pedantic interpretation
(^_^), displaying an image with "no interpolation" would mean displaying
each pixel as an infinitesimal point, which isn't really possible.

For a vtkImageActor object or a vtkImageSlice object, the following method
should work:

    actor->SetInterpolationTypeToNearest();

For vtkImageViewer2,

    viewer->GetImageActor()->GetProperty()->SetInterpolationTypeToNearest();

 - David

On Wed, Jun 3, 2015 at 12:00 PM, Angela Noecker <noeckera at gmail.com> wrote:

> Can someone help me figure out how to display vtkImageData such that when
> I zoom way in I see sharp voxel corners and edges instead of blurry ones.
> Is this even possible?  I understand that the display of vtkImageData is
> "point-based" and not "voxel-based."
>
> Thanks,
>
> Angela
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150603/d543c6f8/attachment.html>


More information about the vtkusers mailing list