I’m trying to extract the eigen values of a Hessian Image using itk.SymmetricEigenAnalysisImageFilter to further implement different vesselness filters. But the problem is that i couldn’t manipulate the result from the symmetricEigenAnalysis using for an example an ImageRegionIterator. I also tried to turn the result from the filter into an array to extract the values by hand but it didn’t work as well.
So there are any filters or algorithms that i can use to extract the eigen values and also do some calculations with them?
It would help if you show the code of what you have tried.
There are no ImageRegionIterators in python.
The output of the symmetricEigenAnalysisImageFilter is a symmetric second rank tensor image, which might need to be handled a bit differently in the python side.
So, basically i was trying to extract the eigen values and do the Jerman’s vesselness method base in a C++ code that i’ve found. In first, my goal is to extract the eigen values and do some operation with them, and after create a vesselness image based on those results. I’ve done more research and some people say to use numpy to run over the second rank order image and catch those values, i’m trying to do this, but any results yet.
One more doubt, i’m also having problem to set the OrderEigenValuesBy() to magnitude order, i’m not knowing how to change this.
OBS: sorry for the format of the code, i’m a beginner user in using foruns for code support.
After you have finished your itk pipeline, and you have the EigenAnalysis image, you can try to convert it to a numpy array with np_img = itk.GetArrayFromImage(itk_eigen_analysis_image), and deal with particular pixels (tensors) in python, and apply extra algorithm from there. The python wrappings of ITK don’t expose iterators for performance reasons.
Hope it helps. I would recommend you explore things a little bit first, and come with questions supported by a minimal set of code that you have tried to run and thought about it.