# Combination of methods in vmtkSurfaceCurvature

**URL:** <https://discourse.slicer.org/t/combination-of-methods-in-vmtksurfacecurvature/14226>\
**Category:** VMTK\
**Created:** [October 24, 2020, 7:43pm UTC](https://discourse.slicer.org/t/combination-of-methods-in-vmtksurfacecurvature/14226 "2020-10-24T19:43:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jana\_Trdlicova](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jana_trdlicova/32/8472_2.png) [@Jana\_Trdlicova](https://discourse.slicer.org/u/Jana_Trdlicova)\
**Post date:** [October 24, 2020, 7:43pm UTC](https://discourse.slicer.org/t/combination-of-methods-in-vmtksurfacecurvature/14226/1 "2020-10-24T19:43:33Z")

</div>

Hi everyone,

I have another problem with generating a ‘nice’ mesh of an aneurysm. I use the information about curvature (vmtkSurfaceCurvature) in vmtkMeshGenerator. There are 4 methods for computing the curvature, and I was wondering if I could somehow combine them. For example, I would like to use the gaussian method in one part of the mesh, and the mean method everywhere else. Is this possible?

If not, are there other possibilities of setting the TargetEdgeLengthArrayName, apart from ‘Curvature’ and ‘DistanceToCenterlines’?

Thank you in advance,  
Jana

---

<div class="post-metadata">

**Author:** ![lantiga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lantiga/32/8424_2.png) [@lantiga](https://discourse.slicer.org/u/lantiga)\
**Post date:** [October 26, 2020, 3:03pm UTC](https://discourse.slicer.org/t/combination-of-methods-in-vmtksurfacecurvature/14226/2 "2020-10-26T15:03:45Z")

</div>

Hi Jana,  
what `vmtkMeshGenerator` requires for sizing is just a scalar field. Any `PointData` array associated on the `vtkPolyData` will work.  
So you can create a new array, assign the Gaussian curvature to one portion (according to some geometric criteria - e.g. the points within a sphere) and use mean curvature everywhere else. If you provide the array with a name, `GetPointData()->AddArray(the_array)` and save it, you can then specify that name as `TargetEdgeLengthArrayName` to the script.  
Hope this helps

Luca

---

<div class="post-metadata">

**Author:** ![Jana\_Trdlicova](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jana_trdlicova/32/8472_2.png) [@Jana\_Trdlicova](https://discourse.slicer.org/u/Jana_Trdlicova)\
**Post date:** [October 30, 2020, 8:34am UTC](https://discourse.slicer.org/t/combination-of-methods-in-vmtksurfacecurvature/14226/3 "2020-10-30T08:34:24Z")

</div>

Hi Luca,

thank you very much for your response. Finally, I figured out how to implement it and it works well. 🙂

Now, the only problem is that I would like to smooth the new curvature in order to reduce the sharp edge between the two methods. Could you, please, give me some advice?

Thank you,  
Jana
