How to disable the low pass filter effect on vtkImageViewer2?

Hi all :slight_smile:

I have a question about vtkImageViewer2.

I have tested loading and drawing an image with the sample code.
Link: https://lorensen.github.io/VTKExamples/site/Cxx/Images/StaticImage/

It works well except for one thing.
The shown image looks like to be applied low pass filter effect.
vtkImageViewer2:


original:

How to disable this effect?

Could you please give me an advise for me?

Thank you :slight_smile:

Maybe you just need to increase the window size so that it’s at least as large as the image size? E.g:

imageViewer->GetRenderWindow()->SetSize(780, 780);

Edit: also, it’s possible that what you are seeing is antialiasing, not actual blurring. Try turning off interpolation to see if that helps.

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

Hi David.
Thank you for your help!

I can resolve this problem by using ‘SetInterpolationTypeToNearest()’.

Thank you :slight_smile:

Have a nice day!