# Laplacian Filter

**URL:** https://discourse.vtk.org/t/laplacian-filter/6174
**Category:** Support
**Created:** [July 12, 2021, 3:05pm UTC](https://discourse.vtk.org/t/laplacian-filter/6174 "2021-07-12T15:05:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Hyunwoo\_Kim](https://discourse.vtk.org/user_avatar/discourse.vtk.org/hyunwoo_kim/32/3465_2.png) [@Hyunwoo\_Kim](https://discourse.vtk.org/u/Hyunwoo_Kim)
#### Post date: [July 12, 2021, 3:05pm UTC](https://discourse.vtk.org/t/laplacian-filter/6174/1 "2021-07-12T15:05:36Z")

</div>

Hi, I want to use a smoothing tool for my poly data.

my poly data is a surface mesh of grey matter.

However, when I use a smoothing filter, the surfaces intersect each other.

```
            int smoothingIterations = 40;
            double passBand = 0.001;
            double featureAngle = 90.0;
            vtkWindowedSincPolyDataFilter smoother = vtkWindowedSincPolyDataFilter.New();
            smoother.SetInputConnection(surface.GetOutputPort());
            smoother.SetNumberOfIterations(smoothingIterations);
            smoother.BoundarySmoothingOff();
            smoother.FeatureEdgeSmoothingOff();
            smoother.NonManifoldSmoothingOff();
            smoother.NormalizeCoordinatesOff();
            smoother.SetFeatureAngle(featureAngle);
            smoother.SetPassBand(passBand);
            smoother.Update();

```

this is my sample code.  
How can I smooth complicated surface mesh such as GM, WM without any line intersection, triangle intersection?  
If any suggestions, it would be so great

Thanks.

---

<div class="post-metadata">

### Author: ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)
#### Post date: [July 12, 2021, 3:10pm UTC](https://discourse.vtk.org/t/laplacian-filter/6174/2 "2021-07-12T15:10:40Z")

</div>

The smoothing filters in VTK are topological operations, they do not check for geometric intersection. You’ll have to write your own filter for that - it’s a very complex algorithm.

---

<div class="post-metadata">

### Author: ![Hyunwoo\_Kim](https://discourse.vtk.org/user_avatar/discourse.vtk.org/hyunwoo_kim/32/3465_2.png) [@Hyunwoo\_Kim](https://discourse.vtk.org/u/Hyunwoo_Kim)
#### Post date: [July 12, 2021, 3:40pm UTC](https://discourse.vtk.org/t/laplacian-filter/6174/3 "2021-07-12T15:40:16Z")

</div>

Is there any paper or related algorithm for that?  
I read your triangulation algorithm paper(including decimation).  
I think you have the solution for the smoothing problem.

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [July 13, 2021, 5:16pm UTC](https://discourse.vtk.org/t/laplacian-filter/6174/4 "2021-07-13T17:16:23Z")

</div>

One simple solution is to perform smoothing before surface extraction, because no self-intersection may occur in labelmaps.

However, most likely a simple generic surface smoothing will not get you too far. For proper analysis you will probably have to implement a surface generation pipeline that is similar to [FreeSurfer](https://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferAnalysisPipelineOverview).
