[vtkusers] Interpolation of data..

Bill Lorensen bill.lorensen at gmail.com
Tue Apr 27 08:20:11 EDT 2010


I have no idea. As far as I know, there are no extrapolation technies in VTK.
Have to you read this:
http://en.wikipedia.org/wiki/Extrapolation

Maybe someone else can help.

Bill

On Mon, Apr 26, 2010 at 1:03 PM, Rakesh Patil <rakeshthp at in.com> wrote:
>
>
> Hi,
>
> As far as my knowledge is concerned, a point with unknown value can lye
> either inside a range [min, max] or outsie the range [min, max].
>
> If the point lies inside the range, then using interpolation we can find the
> unknow value for that point.. And if the point lies outside the range,
> then, using extrapolation technique, we find the unknown value for that
> point.. I guess I'm right.. If i'm wrong please tell me..
>
> Here in my case, i need to find the same elevation at lat/lons for all the
> node points on my mesh.. I guess inverse weighted method should do the need.
>
> I also read that shepard method uses inverse weighted method, but it doesnt
> suffice my need.. I hope my problem is clear.. What values it finds for the
> nodes
> inside the range, the same value i want to be found for the node points that
> fall outside the range..
>
> I've seen that some plottin tools have the capability to do this... But i'm
> blank about how that is done.. I have implemented the linear interpolation
> method and it works fine. It interpolates and gets the values for all points
> (inside and outside).. But it takes hell amount of time.. So, i want to
> overcome the speed.
>
> Any idea or suggestions..??
>
> Thanks
>
> Regards
> Rakesh Patil
> ---------- Original message ----------
> From:Bill Lorensen< bill.lorensen at gmail.com >
> Date: 26 Apr 10 17:35:48
> Subject: Re: [vtkusers] Interpolation of data..
> To: Rakesh Patil
>
> What values would you expect in area where you have no elevation data?
>
> Maybe I misunderstand the problem.
>
> On Sun, Apr 25, 2010 at 9:45 PM, Rakesh Patil wrote:
>>
>>
>> Hi,
>>
>> So, you mean there is no other way..?? extrapolation or anything..??
>>
>> In that case i need to write my own filter to do this then..??
>>
>> Thanks
>>
>> Regards
>> Rakesh Patil
>> ---------- Original message ----------
>> From:Bill Lorensen< bill.lorensen at gmail.com >
>> Date: 26 Apr 10 02:13:14
>> Subject: Re: [vtkusers] Interpolation of data..
>> To: Rakesh Patil
>>
>> If you do not have data in a region, I don't see how you can interpolate
>> it.
>>
>> On Sun, Apr 25, 2010 at 1:54 PM, Rakesh Patil wrote:
>>>
>>>
>>> Hi Bill,
>>>
>>> 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.
>>>
>>> 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..
>>> In the rwo white patches, the values are not interpolated. I mean i dont
>>> get
>>> the actual result there in those areas (a s there is no scatter points
>>> avail
>>> there)
>>>
>>> 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
>>> to implement this..??
>>>
>>> Thanks
>>>
>>> Regards
>>> Rakesh Patil
>>> ---------- Original message ----------
>>> From:Bill Lorensen< bill.lorensen at gmail.com >
>>> Date: 24 Apr 10 18:15:33
>>> Subject: Re: [vtkusers] Interpolation of data..
>>> To: Rakesh Patil
>>>
>>> The last part of this example:
>>> http://www.vtk.org/Wiki/VTK/Examples/InterpolateTerrain
>>> does what you want.
>>>
>>> Basically,
>>> 1) Add the lat/lo g and elevations t o a polydata
>>> 2) Create a surface with Delaunay2D
>>> 3) Add the points with unknown elevation to a vtkPoints
>>> 4) Use a cell locator to cast infinite rays into the surface to find
>>> the elevation.
>>>
>>>
>>> On Fri, Apr 23, 2010 at 9:50 PM, Rakesh Patil wrote:
>>>>
>>>>
>>>> Well,
>>>>
>>>> I was trying with this example:
>>>>
>>>> http://www.vtk.org/Wiki/VTK/Examples/InterpolateTerrain
>>>>
>>>> In this example, there are two ways specified for interpolation.. One is
>>>> using
>>>> vtkProbeFilter and another is using vtkCellLocator
>>>>
>>>> First i tried using vtkProbeFilter. But failed getting the output.. But
>>>> using the
>>>> vtkCellLocato r, i was able to produce 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..??
>>>>
>>>> Thanks
>>>>
>>>> Rakesh Patil
>>>>
>>>> ---------- Original message ----------
>>>> From:"Dean Inglis"< dean.inglis at camris.ca >
>>>> Date: 23 Apr 10 23:59:48
>>>> Subject: Re: Re:[vtkusers]Interpolation of data..
>>>> To: "Rakesh Patil"
>>>>
>>>> How can you expect your mesh to get interpolated
>>>> when its z coordinate values are all 0
>>>> but the scatter data range in z from -700 to -900?
>>>> The bounds of each unstructured grid do not even
>>>> overlap / intersect!
>>>>
>>>> Dean
>>>>
>>>>> Hi,My both the meshes are uns tructured grid. My application is based
>>>>> on
>>>>> FEA meth od.. 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:"De an Inglis"< dean.inglis at camris.ca >Date: 23 Apr 10
>>>>> 20:16:47Subject:Re: Re:[vtkusers]Interpolation of data..To: "Rakesh
>>>>> Patil"
>>>>& gt; vtkProbeFlter will probe the scalar values ateach spatial location
>>>> of
>>>>> your
>>>>> scattered points: youneed to have scalar, vector, or tensor data
>>>>> asso ciatedwith 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 Message From: "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 =
>>>>>
>>>>>
>>>>>
>>>>> vtkSm
>>>>> artPointer::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">
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Please keep messages on-topic and check the VTK FA Q at:
>>>> htt p://www.vtk.org/Wiki/VTK_FAQ
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>>
>>>>
>>>
>>
>



More information about the vtkusers mailing list