[vtkusers] Interpolation of data..

Rakesh Patil rakeshthp at in.com
Fri Apr 23 21:50:43 EDT 2010


 Well,I was trying with this example:http://www.vtk.org/Wiki/VTK/Examples/InterpolateTerrainIn this example, there are two ways specified for interpolation.. One is usingvtkProbeFilter and another is using vtkCellLocatorFirst i tried using vtkProbeFilter. But failed getting the output.. But using thevtkCellLocator, i was able toproduce interpolated values for the third column of MeshG.After observation, i foound that only the region which is common in both the grids, was interpolated. So i was fully stuck wondering how to find the remaining values..any comments..??ThanksRakesh Patil Original message From:"Dean Inglis"< dean.inglis at camris.ca >Date: 23 Apr 10 23:59:48Subject:Re: Re:[vtkusers]Interpolation of data..To: "Rakesh Patil" How can you expect your mesh to get interpolatedwhen its z coordinate values are all 0but the scatter data range in z from 700 to 900?The bounds of each unstructured grid do not evenoverlap / intersect!Dean> Hi,My both the meshes are unstructured gr
 id. My application is based on > FEA method.. ScatterG does contains scalars and the depth values are > stored as a scalar array for scatterG..I dont want coordinate values to be > interpolated.. As an example,scatterG contains data something like > this,Points: 87.23 16.2690086.24 17.8753087.18 17.27700......and the > scalar for scatterG is defined as 900530700......meshG contains > points84.1217.83 081.3315.28 083.2418.28 0......So,, what i want to do is, > using the third column of scatterG, i need to estimate the third column of > meshG..Any ideas how it can be done.??ThanksRakesh Patil Original message > From:"Dean Inglis"< dean.inglis at camris.ca >Date: 23 Apr 10 > 20:16:47Subject:Re: Re:[vtkusers]Interpolation of data..To: "Rakesh Patil" > vtkProbeFlter will probe the scalar values ateach spatial location of your > scattered points: youneed to have scalar, vector, or tensor data > associatedwith the grid's points:scatterG>GetPointData()>SetScalars( > somevt> kDataArray 
 );the vtkProbeFilter will not interpolate any coordinatevalues > like x , y,z locations.If you have depth valuesin a vtkDataArray that > correspond to the x, y, z locationsin your scatterG grid, then this should > work.Does anyone know ifmaybe the input to the probe filter needs to be a > structured data set likevtkPolyData? By the sound of your grid's name > "mesh" , this sounds like structureddata.Can it be converted to a > vtkPolyData?Also, you allocate a smart pointer as:vtkSmartPointer probe = > vtkSmartPointer::New()Dean Original MessageFrom: "Rakesh Patil" To: Cc: > Sent: Friday, April 23, 2010 9:40 AMSubject: Re: Re:[vtkusers] > Interpolation of data..> Hi..I can independently view those grids... This > is what I have done..vtkUnstructuredGrid *scatterG = > MyApp::getInstance()>getScatterGrid();vtkUnstructuredGrid *meshG = > MyApp::getInstance()>getMeshGrid();vtkSmartPointer probe = > vtkSmartPointer::New();probe>SetSource(scatterG);probe>SetInput(meshG);probe>Update
 ();vtkDataArr> ay *data = probe>GetOutput()>GetPointData()>GetScalar();vtkDoubleArray > *doubleArray = > vtkDoubleArray::SafeDownCast(data);MyContour::getInstance()>setDisplayArray(doubleArray);After > doing this, i click on contour display button, and the contour for > bathymetry gets displayed for meshG.Initially, meshG doesnt have > depth/elevation (z) value. z value is always 0 for every node point. x and > y corresponds to the lon and lat respectively.But the scatter data > contains lon, lat, and depth.. So, once the interpolation is done, i > should get the bathymetry (depth/elevation) for meshG also..'MyContour' in > the above code is the class which displays the contours for wh> atever > data is being passed.So, any suggestions or > comments..??ThanksRegards > Rakesh Patil Original messageFrom:Dean Inglis< > dean.inglis at camris.ca > > Date: 23 Apr 10 16:49:50 Subject:Re: > Re:[vtkusers]Interpolation of > data.. To: "Rakesh Patil">>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100424/2c63f2fe/attachment.htm>


More information about the vtkusers mailing list