[vtkusers] Mesh Interpolation

Andrew E. Slaughter andrew.slaughter at inl.gov
Tue Nov 27 00:39:35 EST 2018


Thanks for the information, but I don’t see where the vtkInterpolateDataSetAttribute documentation discusses implicit functions. My reason for going down this path is as follows:

The documentation states “vtkInterpolateDataSetAttributes is a filter that interpolates data set attribute values between input data sets.” This is exactly my situation. I have two vtkUnstructuredGrid objects (which is a vtkDataSet). Each of these objects contain vtkPointData (which is a vtkDataSetAttributes). These two objects are exactly the same with respect to the number of nodes, cells, etc.

If you can explain why my understanding of this class is wrong I would appreciate it.

I used the example you provided as a guide to setting up the vtkInterpolateDataSetAttribute object, but a problem I am seeing with the interpolation is that the number of input ports is always reporting 1 in the vtkInterpolateDataSetAttribute object, regardless of how many items I add. I can’t set the number of points in python, since the SetNumberOfInputPorts is a protected member, thus not part of the python API. I will keep investigating this, thanks for your help.


From: Jonathan Borduas <jonathan.borduas at caboma.com>
Date: Monday, November 26, 2018 at 10:00 PM
To: "Andrew E. Slaughter" <andrew.slaughter at inl.gov>, vtkusers <vtkusers at vtk.org>
Subject: RE: [vtkusers] Mesh Interpolation

See the test of the vtkInterpolateDataSetAttributes:
https://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Filters/Hybrid/Testing/Python/3DMorph.py<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.vtk.org_gitweb-3Fp-3DVTK.git-3Ba-3Dblob-3Bf-3DFilters_Hybrid_Testing_Python_3DMorph.py&d=DwMGaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=axwcLPpoiBAwLGukOnCod5sBNR8H6iwjHEZzqOt42f0&s=E0pqg65BmyPlyhMeb9i9kudpH5yoQmJsE7DtjwAH28w&e=>

Didn’t understand why you would need to use that class though.

I think the name is misleading you. If you look at the example, this isn’t for data interpolation ! It is for the interpolation of implicit functions (as seen in the test).

More on implicit functions:  https://www.vtk.org/doc/nightly/html/classvtkImplicitFunction.html<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.vtk.org_doc_nightly_html_classvtkImplicitFunction.html&d=DwMGaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=axwcLPpoiBAwLGukOnCod5sBNR8H6iwjHEZzqOt42f0&s=RSejo5gmFIa-9ILQrG7UZD5NgvcpxnwvBh9-mXzC0fo&e=>

vtkInterpolateDataSetAttributes  actually looks more like an Optimal Transport Interpolator: https://www.youtube.com/watch?v=6nhfArEM4Sg<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.youtube.com_watch-3Fv-3D6nhfArEM4Sg&d=DwMGaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=axwcLPpoiBAwLGukOnCod5sBNR8H6iwjHEZzqOt42f0&s=GR9UMU1eEHx7lhmZz0mJ_cSBRIGz2A56NzXupdmRRLk&e=>

Jonathan


From: Andrew E. Slaughter <andrew.slaughter at inl.gov>
Sent: Monday, November 26, 2018 11:43 PM
To: Jonathan Borduas <jonathan.borduas at caboma.com>; vtkusers <vtkusers at vtk.org>
Subject: Re: [vtkusers] Mesh Interpolation

I nearly have the problem figured out, but I cannot get vtkInterpolateDataSetAttributes to run. If anyone has experience with this class I would appreciate some insight into it use. I am using the object on line 114 of the attached script.

Thanks.

From: Jonathan Borduas <jonathan.borduas at caboma.com<mailto:jonathan.borduas at caboma.com>>
Date: Monday, November 26, 2018 at 11:17 AM
To: "Andrew E. Slaughter" <andrew.slaughter at inl.gov<mailto:andrew.slaughter at inl.gov>>, vtkusers <vtkusers at vtk.org<mailto:vtkusers at vtk.org>>
Subject: Re: [vtkusers] Mesh Interpolation

Hi Andrew,

One way to interpolate point and cell data between two mesh: you can use the vtkPointInterpolator with a Voronoi Kernel (or other kernel), do a itk::DiscreteGaussianImageFilter over the 3D image to smooth the interpolation and then do a vtkProbeFilter.


Best,

Jonathan

Get Outlook for iOS<https://urldefense.proofpoint.com/v2/url?u=https-3A__aka.ms_o0ukef&d=DwMF-g&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=aAOXM3i-LCmwbKnx-O9gSjuXokpbn-5eRK65fXdzvCg&s=fr7AzqyWyyeMEM2RozZhbe697LCCwggGrGZtJhKSQAY&e=>
________________________________
From: vtkusers <vtkusers-bounces at public.kitware.com<mailto:vtkusers-bounces at public.kitware.com>> on behalf of Andrew E. Slaughter via vtkusers <vtkusers at public.kitware.com<mailto:vtkusers at public.kitware.com>>
Sent: Monday, November 26, 2018 1:09:55 PM
To: vtkusers
Subject: [vtkusers] Mesh Interpolation

I need to perform interpolation of data between two ExodusII files that differ because of refinement. I was hoping someone could point me in the
correct direction for performing this action. I have attached the Exodus files that I am working with as well as a  script that reads and displays the two files.
I am using VTK7.1 (I can use 8 if needed) on MacOS.

Here is the steps that I envision, but I am open to all options:

1.      Interpolate the result from the coarse mesh to the fine mesh (I don’t know how to do this step).

2.      Use vtkInterpolateDataSetAttributes to interpolate between the result from (1) and the fine mesh.

Thanks for the help,

Andrew



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181127/8b0bfe7d/attachment.html>


More information about the vtkusers mailing list