[vtkusers] Linear interpolation in vtkImageReslice
Luca Pamparana
luca.pamparana at gmail.com
Mon Sep 17 12:02:07 EDT 2007
Hi everyone,
Just trying to understand the linear interpolation algorithm as implemented
in the vtkImageReslice class. I tried looking at the source code but it is
really complicated and I could not understand much :(
Anyway, I am zooming my image by a factor of 2. The image is a synthetic
image which has a thick edge going along its diagonal (the value is changing
from 0 to 255) and I am trying to look at how the values are interpolated in
that region.
One thing I noticed is that there are 2 pixels being inserted in the
horizontal direction. So, I get the values 255, 191, 64 and 0 (255 and 0 are
the old values and the two new values are being generated by taking a
weighted average). Is this correct? I thought that if I zoom by a factor of
2.0 than one pixel should be inserted between successive pixels. I am not
sure what happens at the edge pixels though.
Also, what happens in the vertical direction? I cannot really figure out how
this works...
I would really appreciate it if someone can clarify these doubts for me....
I have spend the whole day trying to understand this but have not yet been
able to comprehend this implementation.
Thanks,
Luca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070917/684ce205/attachment.htm>
More information about the vtkusers
mailing list