<br><br><blockquote>Well,<br><br>I was trying with this example:<br><br><a target=\"_blank\" href="http://www.vtk.org/Wiki/VTK/Examples/InterpolateTerrain">http://www.vtk.org/Wiki/VTK/Examples/InterpolateTerrain</a><br><br>In this example, there are two ways specified for interpolation.. One is using<br>vtkProbeFilter and another is using vtkCellLocator<br><br>First i tried using vtkProbeFilter. But failed getting the output.. But using the<br>vtkCellLocator, i was able to produce interpolated values for the third column of MeshG.<br><br>After observation, i foound that only the region which is common in both the grids, <br>was interpolated. So i was fully stuck wondering how to find the remaining 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" <rakeshthp@
in.com><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 method.. 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>> associatedwith 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>> vtkSmartPointer::New();probe>SetSource(scatterG);probe>SetInput(meshG);probe>Update();vtkDataArr<br>> ay *data = probe>GetOutput()>GetPointData()>GetScalar();vtkDoubleArray <br>> *doubleArray = <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></rakeshthp@in.com></blockquote>