# Calculating Eigenvectors using Python and ITK

**URL:** https://discourse.itk.org/t/calculating-eigenvectors-using-python-and-itk/1638
**Category:** Beginner Questions
**Created:** [March 7, 2019, 12:14pm UTC](https://discourse.itk.org/t/calculating-eigenvectors-using-python-and-itk/1638 "2019-03-07T12:14:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vero](https://discourse.itk.org/letter_avatar_proxy/v4/letter/v/e19b73/32.png) [@vero](https://discourse.itk.org/u/vero)
#### Post date: [March 7, 2019, 12:14pm UTC](https://discourse.itk.org/t/calculating-eigenvectors-using-python-and-itk/1638/1 "2019-03-07T12:14:03Z")

</div>

Hey,  
I’m trying to calculate eigenvalues and -vectors of a hessian matrix I received with the HessianRecursiveGaussianImageFilter using Python. So far I found neither in SimpleITK nor in ITK an algorithm that would work.  
For the SymmetricEigenAnalysisImageFilter and similar filters there seems to be no possibility to access the functionalities via Python.  
So are there any algorithms in ITK or SimpleITK I can use to calculate my 3D images’ eigenvectors voxelwise? I need the eigenvectors to compare neighboring voxels to get clues about the structure they are part of.  
Thanks, Vero 🙂

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [March 15, 2019, 9:31pm UTC](https://discourse.itk.org/t/calculating-eigenvectors-using-python-and-itk/1638/2 "2019-03-15T21:31:39Z")

</div>

Hi Vero :-),

Welcome to ITK!

I will look into wrapping the [`itk.SymmetricEigenAnalysisImageFilter`](https://itk.org/Doxygen40/html/classitk_1_1SymmetricEigenAnalysisImageFilter.html) for you.

Cheers,  
Matt

---

<div class="post-metadata">

### Author: ![vero](https://discourse.itk.org/letter_avatar_proxy/v4/letter/v/e19b73/32.png) [@vero](https://discourse.itk.org/u/vero)
#### Post date: [March 22, 2019, 8:50am UTC](https://discourse.itk.org/t/calculating-eigenvectors-using-python-and-itk/1638/3 "2019-03-22T08:50:09Z")

</div>

Hey Matt,

I just saw your answer. Thanks for wrapping the filter 🙂 will help a lot 🙂

Cheers,  
Veronika
