<br><br><blockquote>Hi Bill,<br><br>Thanks for your reply.. I implemented that technique and it works fine. As i said in my previous post, outsid range values are not interpolated.<br><br>For example, pls see the attached image file for reference.. In the figure, the mesh which is generated, doesnt completely fall in the area of the scatter data.. <br>In the rwo white patches, the values are not interpolated. I mean i dont get the actual result there in those areas (as there is no scatter points avail there)<br><br>So, what can i do to get values for my entire mesh instead of getitng for partial mesh.??Either interolation or extrapolation.. Any means is available in VTK <br>to implement this..??<br><br>Thanks<br><br>Regards<br>Rakesh Patil<br>---------- Original message ----------<br>From:Bill Lorensen< bill.lorensen@gmail.com ><br>Date: 24 Apr 10 18:15:33<br>Subject: Re: [vtkusers] Interpolation of data..<br>To: Rakesh Patil <rakeshthp@in.com><br><br>The last part of
this example:<br>http://www.vtk.org/Wiki/VTK/Examples/InterpolateTerrain<br>does what you want.<br><br>Basically,<br>1) Add the lat/log and elevations to a polydata<br>2) Create a surface with Delaunay2D<br>3) Add the points with unknown elevation to a vtkPoints<br>4) Use a cell locator to cast infinite rays into the surface to find<br>the elevation.<br><br><br>On Fri, Apr 23, 2010 at 9:50 PM, Rakesh Patil <rakeshthp@in.com> wrote:<br>><br>><br>> Well,<br>><br>> I was trying with this example:<br>><br>> <a target=\"_blank\" href="http://www.vtk.org/Wiki/VTK/Examples/InterpolateTerrain" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/InterpolateTerrain</a><br>><br>> In this example, there are two ways specified for interpolation.. One is<br>> using<br>> vtkProbeFilter and another is using vtkCellLocator<br>><br>> First i tried using vtkProbeFilter. But failed getting the output.. But<br>> using the<br>> vtkCellLocator, i was
able to produce interpolated values for the third<br>> column of MeshG.<br>><br>> After observation, i foound that only the region which is common in both the<br>> grids,<br>> was interpolated. So i was fully stuck wondering how to find the remaining<br>> values..<br>><br>> any comments..??<br>><br>> Thanks<br>><br>> Rakesh Patil<br>><br>> ---------- Original message ----------<br>> From:"Dean Inglis"< dean.inglis@camris.ca ><br>> Date: 23 Apr 10 23:59:48<br>> Subject: Re: Re:[vtkusers]Interpolation of data..<br>> To: "Rakesh Patil"<br>><br>> How can you expect your mesh to get interpolated<br>> when its z coordinate values are all 0<br>> but the scatter data range in z from -700 to -900?<br>> The bounds of each unstructured grid do not even<br>> overlap / intersect!<br>><br>> Dean<br>><br>>> Hi,My both the meshes are unstructured grid. My application is based on<br>>> FEA meth
od.. ScatterG does contains scalars and the depth values are<br>>> stored as a scalar array for scatterG..I dont want coordinate values to be<br>>> interpolated.. As an example,scatterG contains data something like<br>>> this,Points: 87.23 16.2690086.24 17.8753087.18 17.27700......and the<br>>> scalar for scatterG is defined as 900530700......meshG contains<br>>> points84.1217.83 081.3315.28 083.2418.28 0......So,, what i want to do is,<br>>> using the third column of scatterG, i need to estimate the third column of<br>>> meshG..Any ideas how it can be done.??ThanksRakesh Patil Original message<br>>> From:"De an Inglis"< dean.inglis@camris.ca >Date: 23 Apr 10<br>>> 20:16:47Subject:Re: Re:[vtkusers]Interpolation of data..To: "Rakesh Patil"<br>>> vtkProbeFlter will probe the scalar values ateach spatial location of your<br>>> scattered points: youneed to have scalar, vector, or tensor data<br>>> asso
ciatedwith the grid's points:scatterG>GetPointData()>SetScalars(<br>>> somevt<br>>> kDataArray );the vtkProbeFilter will not interpolate any coordinatevalues<br>>> like x , y,z locations.If you have depth valuesin a vtkDataArray that<br>>> correspond to the x, y, z locationsin your scatterG grid, then this should<br>>> work.Does anyone know ifmaybe the input to the probe filter needs to be a<br>>> structured data set likevtkPolyData? By the sound of your grid's name<br>>> "mesh" , this sounds like structureddata.Can it be converted to a<br>>> vtkPolyData?Also, you allocate a smart pointer as:vtkSmartPointer probe =<br>>> vtkSmartPointer: :New()Dean Original Message From: "Rakesh Patil" To: Cc:<br>>> Sent: Friday, April 23, 2010 9:40 AMSubject: Re: Re:[vtkusers]<br>>> Interpolation of data..> Hi..I can independently view those grids... This<br>>> is what I have done..vtkUnstructuredGrid *scatterG
=<br>>> MyApp::getInstance()>getScatterGrid();vtkUnstructuredGrid *meshG =<br>>> MyApp::getInstance()>getMeshGrid();vtkSmartPointer probe =<br>>><br>>> vtkSmartPointer::New();probe>SetSource(scatterG);probe>SetInput(meshG);probe>Update();vtkDataArr<br>>> ay *data = probe>GetOutput()>GetPointData()>GetScalar();vtkDoubleArray<br>>> *doubleArray =<br>>><br>>> vtkDoubleArray::SafeDownCast(data);MyContour::getInstance()>setDisplayArray(doubleArray);After<br>>> doing this, i click on contour display button, and the contour for<br>>> bathymetry gets displayed for meshG.Initially, meshG doesnt have<br>>> depth/elevation (z) value. z value is always 0 for every node point. x and<br>>> y corresponds to the lon and lat respectively.But the scatter data<br>>> contains lon, lat, and depth.. So, once the interpolation is done, i<br>>> should get the bathymetry (depth/elevation)
for meshG also..'MyContour' in<br>>> the above code is the class which displays the contours for wh> atever<br>>> data is being passed.So, any suggestions or > comments..??ThanksRegards<br>>> Rakesh Patil Original messageFrom:Dean Inglis< > dean.inglis@camris.ca ><br>>> Date: 23 Apr 10 16:49:50 Subject:Re: > Re:[vtkusers]Interpolation of<br>>> data.. To: "Rakesh Patil"><br>>><br>><br>><br>> _______________________________________________<br>> Powered by <a target=\"_blank\" href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>><br>> Visit other Kitware open-source projects at<br>> <a target=\"_blank\" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>><br>> Please keep messages on-topic and check the VTK FAQ at:<br>> <a target=\"_blank\" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">htt
p://www.vtk.org/Wiki/VTK_FAQ</a><br>><br>> Follow this link to subscribe/unsubscribe:<br>> <a target=\"_blank\" href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>><br>><br></rakeshthp@in.com></rakeshthp@in.com></blockquote>