Mesh Interpolation

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Mesh Interpolation

David E DeMarle via vtkusers

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

 

 

 


_______________________________________________
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 FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers

input_out.e (52K) Download Attachment
input_out.e-s002 (34K) Download Attachment
interpolate.py (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mesh Interpolation

jbor
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


From: vtkusers <[hidden email]> on behalf of Andrew E. Slaughter via vtkusers <[hidden email]>
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

 

 

 


_______________________________________________
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 FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Mesh Interpolation

David E DeMarle via vtkusers

If possible I need to maintain the UnstructuredGrid, I started an attempt to get this working. If anyone is willing I would appreciate the help. I will keep working on it as well.

 

 

From: Jonathan Borduas <[hidden email]>
Date: Monday, November 26, 2018 at 11:17 AM
To: "Andrew E. Slaughter" <[hidden email]>, vtkusers <[hidden email]>
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

 


From: vtkusers <[hidden email]> on behalf of Andrew E. Slaughter via vtkusers <[hidden email]>
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

 

 

 


_______________________________________________
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 FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers

interpolate.py (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mesh Interpolation

David E DeMarle via vtkusers
In reply to this post by jbor

In my previous reply I included the wrong script, this one still doesn’t work, but runs. Sorry.

 

From: Jonathan Borduas <[hidden email]>
Date: Monday, November 26, 2018 at 11:17 AM
To: "Andrew E. Slaughter" <[hidden email]>, vtkusers <[hidden email]>
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

 


From: vtkusers <[hidden email]> on behalf of Andrew E. Slaughter via vtkusers <[hidden email]>
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

 

 

 


_______________________________________________
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 FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers

interpolate.py (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mesh Interpolation

David E DeMarle via vtkusers
In reply to this post by jbor

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 <[hidden email]>
Date: Monday, November 26, 2018 at 11:17 AM
To: "Andrew E. Slaughter" <[hidden email]>, vtkusers <[hidden email]>
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

 


From: vtkusers <[hidden email]> on behalf of Andrew E. Slaughter via vtkusers <[hidden email]>
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

 

 

 


_______________________________________________
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 FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers

interpolate.py (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mesh Interpolation

jbor

See the test of the vtkInterpolateDataSetAttributes:

https://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Filters/Hybrid/Testing/Python/3DMorph.py

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

 

vtkInterpolateDataSetAttributes  actually looks more like an Optimal Transport Interpolator: https://www.youtube.com/watch?v=6nhfArEM4Sg

 

Jonathan

 

 

From: Andrew E. Slaughter <[hidden email]>
Sent: Monday, November 26, 2018 11:43 PM
To: Jonathan Borduas <[hidden email]>; vtkusers <[hidden email]>
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 <[hidden email]>
Date: Monday, November 26, 2018 at 11:17 AM
To: "Andrew E. Slaughter" <[hidden email]>, vtkusers <[hidden email]>
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

 


From: vtkusers <[hidden email]> on behalf of Andrew E. Slaughter via vtkusers <[hidden email]>
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

 

 

 


_______________________________________________
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 FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Mesh Interpolation

David E DeMarle via vtkusers

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 <[hidden email]>
Date: Monday, November 26, 2018 at 10:00 PM
To: "Andrew E. Slaughter" <[hidden email]>, vtkusers <[hidden email]>
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

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

 

vtkInterpolateDataSetAttributes  actually looks more like an Optimal Transport Interpolator: https://www.youtube.com/watch?v=6nhfArEM4Sg

 

Jonathan

 

 

From: Andrew E. Slaughter <[hidden email]>
Sent: Monday, November 26, 2018 11:43 PM
To: Jonathan Borduas <[hidden email]>; vtkusers <[hidden email]>
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 <[hidden email]>
Date: Monday, November 26, 2018 at 11:17 AM
To: "Andrew E. Slaughter" <[hidden email]>, vtkusers <[hidden email]>
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

 


From: vtkusers <[hidden email]> on behalf of Andrew E. Slaughter via vtkusers <[hidden email]>
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

 

 

 


_______________________________________________
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 FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Mesh Interpolation

jbor
Humm, yes, I think you are right. Mea Culpa

It should works. I will try to review your script tomorrow.


From: Andrew E. Slaughter <[hidden email]>
Sent: Tuesday, November 27, 2018 12:39:35 AM
To: Jonathan Borduas; vtkusers
Subject: Re: [vtkusers] Mesh Interpolation
 

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 <[hidden email]>
Date: Monday, November 26, 2018 at 10:00 PM
To: "Andrew E. Slaughter" <[hidden email]>, vtkusers <[hidden email]>
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

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

 

vtkInterpolateDataSetAttributes  actually looks more like an Optimal Transport Interpolator: https://www.youtube.com/watch?v=6nhfArEM4Sg

 

Jonathan

 

 

From: Andrew E. Slaughter <[hidden email]>
Sent: Monday, November 26, 2018 11:43 PM
To: Jonathan Borduas <[hidden email]>; vtkusers <[hidden email]>
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 <[hidden email]>
Date: Monday, November 26, 2018 at 11:17 AM
To: "Andrew E. Slaughter" <[hidden email]>, vtkusers <[hidden email]>
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

 


From: vtkusers <[hidden email]> on behalf of Andrew E. Slaughter via vtkusers <[hidden email]>
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

 

 

 


_______________________________________________
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 FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Mesh Interpolation

David E DeMarle via vtkusers

Thank you again, here is the latest version of the script and data (I changed the ranges to make thinks a bit easier to see). I will keep plugging away at it tomorrow as well.

 

From: Jonathan Borduas <[hidden email]>
Date: Monday, November 26, 2018 at 11:08 PM
To: "Andrew E. Slaughter" <[hidden email]>, vtkusers <[hidden email]>
Subject: Re: [vtkusers] Mesh Interpolation

 

Mea Culpa


_______________________________________________
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 FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers

input_out.e (52K) Download Attachment
input_out.e-s002 (34K) Download Attachment
interpolate.py (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mesh Interpolation

vincentrivola
Hi Andrew,

I saw your message on linkedin.
I did not use the filter you describe on my side. My script is based on the
vtkDistancePolyDataFilter that I compute between the two meshes. Then I loop
over cells of one mesh to get the closest points on the other mesh using a
kdTree and finally compute the interpolated with a distance weighting of
these closest points values.

Hope this helps



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
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 FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers