Hey David,<br><br>Thank you so much. I tried the vtkDelaunay2D then vtkProbeFilter approach you suggested. What I did is use vtkDelaunay2D to triangulate a polydata set of 16 points with known scalars, then probe it with another polydata set of 36 points, then use vtkDelaunay2D again and map the output to polydata mapper and display them. I got Image1 as attached. I did triangulation again because the render window was blank if I map output of vtkProbeFilter directly to polydata mapper. I may have done something wrong.
<br><br>Another thing is if the known data points are not evenly distributed, I got Image2, where all known 16 data are at the bottom left area. The area outside the known data values was interpolated as one color. Is it normal that the data outside the 4*4 area got the same scalar value?
<br><br>Thanks,<br>Janny<br><br><br><div><span class="gmail_quote">On 6/13/07, <b class="gmail_sendername">David Gobbi</b> <<a href="mailto:dgobbi@atamai.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
dgobbi@atamai.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Janny,<br><br>If your original data points do not form a complete, regular grid, then
<br>vtkImageReslice won't give you the result you want. You can't use<br>vtkImageReslice to fill in the gaps.<br><br>Instead, you could try using vtkDelaunay2D to triangularize the data<br>followed by vtkProbeFilter to interpolate the data. A limitation of
<br>ProbeFilter is that it always does linear interpolation, and it cannot<br>interpolate beyond the hull of the original set of points.<br><br> - David<br><br><br>Janny Dong wrote:<br>> I am trying to get a color contour map out of several data points.
<br>> Let's say, I need a nice and smooth 2D color map of dimension 5*5, so<br>> that's 25 points. I know the positions of the points of course, but I<br>> only know 10 data values (scalars). Therefore I need some
<br>> interpolation to get to know data values (scalars) at all positions<br>> and map them to colors.<br>><br>> I put my data into ImageData, and I am using ImageReslice in order to<br>> do the interpolation I want. I constructed pipelines following the
<br>> example David Gobbi provided at<br>> <a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Examples/ImageProcessing/Cxx/ImageSlicing.cxx?root=VTK&content-type=text/plain" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Examples/ImageProcessing/Cxx/ImageSlicing.cxx?root=VTK&content-type=text/plain
</a><br>> <<a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Examples/ImageProcessing/Cxx/ImageSlicing.cxx?root=VTK&content-type=text/plain" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Examples/ImageProcessing/Cxx/ImageSlicing.cxx?root=VTK&content-type=text/plain
</a>><br>><br>> Then I got an image as attached. For now, I just input 10 random<br>> scalar values to 10 positions. I used cubic interpolation. What I want<br>> is interpolation over the whole image area, not just near every point.
<br>> How can I achieve such visualization effect?<br>><br>> Actually I just tried everything to get the visualization effect from<br>> the Matlab functions griddata, which fits a surface of the form z =<br>> f(x,y) to the data in the (usually) nonuniformly spaced vectors
<br>> (x,y,z), but I couldn't find a way in VTK to do the interpolation. I<br>> read from Matlab help document that the griddata methods (nearest<br>> neighbor, cubic, linear) are based on a Delaunay triangulation of the
<br>> data that uses Qhull. However I have no experience with Qhull and not<br>> much time to dig into it. Also, I have to do the project in C++ not<br>> Matlab. VTK is such a powerful visualization tool so I hope I could do
<br>> it with VTK.<br>><br>> Thanks a lot.<br>> Janny<br>><br>> ------------------------------------------------------------------------<br>><br>> ------------------------------------------------------------------------
<br>><br>> _______________________________________________<br>> This is the private VTK discussion list.<br>> Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.vtk.org/Wiki/VTK_FAQ
</a><br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.vtk.org/mailman/listinfo/vtkusers
</a><br>><br><br></blockquote></div><br>