# Parametric Curve Fitting

**URL:** <https://discourse.itk.org/t/parametric-curve-fitting/5585>\
**Category:** Algorithms\
**Created:** [December 22, 2022, 1:04am UTC](https://discourse.itk.org/t/parametric-curve-fitting/5585 "2022-12-22T01:04:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oddone-Scatena](https://discourse.itk.org/user_avatar/discourse.itk.org/oddone-scatena/32/2651_2.png) [@Oddone-Scatena](https://discourse.itk.org/u/Oddone-Scatena)\
**Post date:** [December 22, 2022, 1:04am UTC](https://discourse.itk.org/t/parametric-curve-fitting/5585/1 "2022-12-22T01:04:02Z")

</div>

Hello,

I must fit a parametric surface, or a curve, in the points of my image data. I was wondering how is the best way to do that? I need the parameters of the fitted curve.

Thank you

---

<div class="post-metadata">

**Author:** ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Post date:** [December 22, 2022, 3:29pm UTC](https://discourse.itk.org/t/parametric-curve-fitting/5585/2 "2022-12-22T15:29:30Z")

</div>

Does [this example](https://examples.itk.org/src/filtering/imagegrid/fitsplineintopointset/documentation) accomplish it? There are some VTK examples too:

- [KochanekSpline](https://kitware.github.io/vtk-examples/site/Cxx/PolyData/KochanekSpline/)
- [ParametricSpline](https://kitware.github.io/vtk-examples/site/Cxx/PolyData/ParametricSpline/)

---

<div class="post-metadata">

**Author:** ![Oddone-Scatena](https://discourse.itk.org/user_avatar/discourse.itk.org/oddone-scatena/32/2651_2.png) [@Oddone-Scatena](https://discourse.itk.org/u/Oddone-Scatena)\
**Post date:** [April 11, 2023, 2:09am UTC](https://discourse.itk.org/t/parametric-curve-fitting/5585/3 "2023-04-11T02:09:08Z")

</div>

Hello,

How can I Retrieve The parameters of The basis funcions. Should I use GenerateBSplineShapeFunctions() or GetShapeFunctions()? How do I know which polynomial piece I am retrieving?

Thanks

---

<div class="post-metadata">

**Author:** ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Post date:** [April 11, 2023, 12:12pm UTC](https://discourse.itk.org/t/parametric-curve-fitting/5585/4 "2023-04-11T12:12:59Z")

</div>

Which filter are you using? If this is a VTK question, it should go to the [VTK forum](https://discourse.vtk.org/). Otherwise, I suggest you to start a new topic, and provide more information on what you are trying to accomplish and which classes are you using. Some code samples would probably be helpful in understand your problem.
