If you look at the relevant typedefs,<div><br></div><div>const unsigned int Dimension = 3;</div><div>...</div><div>typedef itk::FixedArray< InputPixelType, Dimension > EigenValueArrayType;</div><div>
typedef itk::Image< EigenValueArrayType, Dimension > EigenValueImageType;</div><div>typedef itk::SymmetricEigenAnalysisImageFilter< HessianFilterType::OutputImageType, EigenValueImageType >EigenAnalysisFilterType;</div>
<div><br></div><div>you see that the output of the EigenAnalysisFilterType is an image of Fixed Arrays of dimension 3. In order to access each eigenvalue, you simply traverse the image using an image iterator. When calling GetPixel(), you will be returned a Fixed Array which contains all three eigenvalues. Read up on the ITK software guide if you're unfamiliar with iterators and/or the documentation for ITK for specific classes.</div>
<div><br></div><div>Here's what I would do:</div><div><br></div><div>// get output</div><div>EigenValueImageType::Pointer eigenImage = eigenAnalysisFilter->GetOutput();</div><div><br></div><div>// setup iterator</div>
<div>typedef itk::ImageRegionIterator<EigenValueImageType> EigenIteratorType;</div><div>EigenIteratorType eigenImageIt(eigenImage,eigenImage->GetLargestPossibleRegion());</div><div><br></div><div>// iterate through image and get each eigen value</div>
<div>for (eigenImageIt.GoToBegin(); !eigenImageIt.IsAtEnd(); ++eigenImage)</div><div>{</div><div> for (int i=0; i<3; i++)</div><div>{</div><div> EigenValueArrayType eigenArray = eigenImageIt.Get();</div><div> std::cout << eigenArray[i] << std::endl;</div>
<div>}</div><div>}</div><div><br><div class="gmail_quote">On Sat, May 14, 2011 at 1:41 PM, ra.corredor <span dir="ltr"><<a href="mailto:ra.corredor@gmail.com">ra.corredor@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Ivan,<br>
<br>
I'm just beginning with ITK and I was testing your<br>
HessianMatrixEigenAnalysis.cxx code in order to obtain the Hessian matrix<br>
eigenvalues of a CT image. In my project, I need to save the three<br>
eigenvalues in a text file using several Sigma values (about 10 scales).<br>
<br>
You wrote in the last post that is possible to access these values using<br>
GetPixel, but what you mean is that eigenAnalysisFilter->GetOutput() is<br>
producing this vector image which can be accessed with getPixel or<br>
iteratiors?? I had some problems adding the little EigenValueAccessor class<br>
to my project, so I'm looking for alternative options for accessing<br>
eigenvalues.<br>
<br>
Is it possible to use MultiScaleHessianBasedMeasureImageFilter to get this<br>
info?<br>
<br>
Thank you !!<br>
<br>
Ricardo<br>
RaC<br>
<br>
<br>
-----<br>
Ricardo A Corredor<br>
RaC<br>
--<br>
View this message in context: <a href="http://itk-insight-users.2283740.n2.nabble.com/RV-about-HessianRecursiveGaussianImageFilter-tp5239095p6363432.html" target="_blank">http://itk-insight-users.2283740.n2.nabble.com/RV-about-HessianRecursiveGaussianImageFilter-tp5239095p6363432.html</a><br>
Sent from the ITK Insight Users mailing list archive at Nabble.com.<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote></div><br></div>