[vtkusers] ImageReslice and Interpolation Can anyone help?

Janny Dong janny.dong at gmail.com
Tue Jun 12 15:28:32 EDT 2007


I am trying to get a color contour map out of several data points. Let's
say, I need a nice and smooth 2D color map of dimension 5*5, so that's 25
points. I know the positions of the points of course, but I only know 10
data values (scalars). Therefore I need some interpolation to get to know
data values (scalars) at all positions and map them to colors.

I put my data into ImageData, and I am using ImageReslice in order to do the
interpolation I want. I constructed pipelines following the example David
Gobbi provided at
http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Examples/ImageProcessing/Cxx/ImageSlicing.cxx?root=VTK&content-type=text/plain

Then I got an image as attached. For now, I just input 10 random scalar
values to 10 positions. I used cubic interpolation. What I want is
interpolation over the whole image area, not just near every point. How can
I achieve such visualization effect?

Actually I just tried everything to get the visualization effect from the
Matlab functions griddata, which fits a surface of the form z = f(x,y) to
the data in the (usually) nonuniformly spaced vectors (x,y,z), but I
couldn't find a way in VTK to do the interpolation. I read from Matlab help
document that the griddata methods (nearest neighbor, cubic, linear) are
based on a Delaunay triangulation of the data that uses Qhull. However I
have no experience with Qhull and not much time to dig into it. Also, I have
to do the project in C++ not Matlab. VTK is such a powerful visualization
tool so I hope I could do it with VTK.

Thanks a lot.
Janny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070612/bc731b72/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ImgInterpolation.JPG
Type: image/jpeg
Size: 23167 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070612/bc731b72/attachment.jpeg>


More information about the vtkusers mailing list