<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Matt,<div class=""><br class=""></div><div class="">Yes, those are very small numbers indeed :) After digging in the code, I found two discrepancies with respect to the vnl symmetric eigensystem, so I took the vnl code as the reference and did the corrections. I am submitting the two patches on gerrit (I didn’t know they would be separated for review, I can merge them if necessary): </div><div class=""><br class=""></div><div class="">- <a href="http://review.source.kitware.com/#/c/20092/" class="">http://review.source.kitware.com/#/c/20092/</a></div><div class="">- <a href="http://review.source.kitware.com/#/c/20093/" class="">http://review.source.kitware.com/#/c/20093/</a></div><div class=""><br class=""></div><div class="">That being said, when digging in the code, it is not clear to me why SymmetricEigenAnalysis is not just a wrapper on vnl_symmetric_eigensystem. This would avoid duplicated code, and I do not see any place in the eigensystem code that wouldn’t be thread safe. But again, I am not an expert of that code and so I may be wrong. In any case, may be something to think of for future work :)</div><div class=""><br class=""></div><div class="">Thanks for the help,</div><div class="">Olivier</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 13 Aug 2015, at 22:59, Matt McCormick <<a href="mailto:matt.mccormick@kitware.com" class="">matt.mccormick@kitware.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">Hi Olivier,<br class=""><br class="">Those are some pretty small numbers ;-).  Thanks for sharing your experiences.<br class=""><br class="">It may be necessary to build both ITK and vnl/netlib instances with<br class="">debugging symbols and walk through them in a debugger to see where the<br class="">deviation occurs.<br class=""><br class="">As always, patches are welcome :-)<br class=""><br class="">Thanks,<br class="">Matt<br class=""><br class="">On Thu, Aug 13, 2015 at 9:35 AM, Olivier Commowick<br class=""><<a href="mailto:Olivier.Commowick@inria.fr" class="">Olivier.Commowick@inria.fr</a>> wrote:<br class=""><blockquote type="cite" class="">Hello all,<br class=""><br class="">I have been experiencing a problem when using the itk SymmetricEigenAnalysis class in ITK. When using this class, it sometimes produces NaN eigenvalues/vectors. On the contrary, the vnl_symmetric_eigensystem doesn’t seem to have a problem (and neither does matlab). Looking at the documentation, it seems both use QL decomposition but not implemented in the same place. In addition, the vnl one is said to be not thread safe, although it’s the one working for me.<br class=""><br class="">In fact, I have isolated one 3x3 matrix for which I always have the problem.<br class=""><br class="">A =<br class="">[7.503107128706855667859804009212206062302e-53 1.870107888834986371214720644344813262375e-52 -8.662047753682068190087788895125120421821e-27;<br class="">1.870107888834986371214720644344813262375e-52 4.661140319458029838073740773908360767728e-52 -2.15896741973055935210319454393408888029e-26;<br class="">-8.662047753682068190087788895125120421821e-27 -2.15896741973055935210319454393408888029e-26 1]<br class=""><br class="">It’s a weird one I know, but again vnl (and matlab) works great on it. Would there be anyone who knows the QL decomposition code enough to help me understand and possibly correct the ITK class so that it does the same as the VNL one ?<br class=""><br class="">Thanks a lot in advance.<br class=""><br class="">---<br class=""><br class="">Olivier Commowick, Ph.D.<br class="">Research Scientist<br class="">INRIA Rennes - Bretagne Atlantique, VISAGES Team<br class="">Campus de Beaulieu<br class="">35042 Rennes<br class="">FRANCE<br class=""><br class="">Phone: +33 2 99 84 25 92<br class="">Email: <a href="mailto:Olivier.Commowick@inria.fr" class="">Olivier.Commowick@inria.fr</a><br class="">Web: <a href="http://olivier.commowick.org/" class="">http://olivier.commowick.org/</a><br class=""><br class=""><br class=""><br class=""><br class=""><br class="">_____________________________________<br class="">Powered by <a href="http://www.kitware.com" class="">www.kitware.com</a><br class=""><br class="">Visit other Kitware open-source projects at<br class=""><a href="http://www.kitware.com/opensource/opensource.html" class="">http://www.kitware.com/opensource/opensource.html</a><br class=""><br class="">Kitware offers ITK Training Courses, for more information visit:<br class="">http://www.kitware.com/products/protraining.php<br class=""><br class="">Please keep messages on-topic and check the ITK FAQ at:<br class="">http://www.itk.org/Wiki/ITK_FAQ<br class=""><br class="">Follow this link to subscribe/unsubscribe:<br class="">http://public.kitware.com/mailman/listinfo/insight-users<br class=""></blockquote></div></blockquote></div><br class=""><div class="">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class=""><br class="Apple-interchange-newline">---</div><div class=""><br class=""></div><div class="">Olivier Commowick, Ph.D.</div><div class="">Research Scientist</div><div class="">INRIA Rennes - Bretagne Atlantique, VISAGES Team</div><div class="">Campus de Beaulieu</div><div class="">35042 Rennes</div><div class="">FRANCE</div><div class=""><br class=""></div><div class="">Phone: +33 2 99 84 25 92</div><div class="">Email: <a href="mailto:Olivier.Commowick@inria.fr" class="">Olivier.Commowick@inria.fr</a></div><div class="">Web: <a href="http://olivier.commowick.org/" class="">http://olivier.commowick.org/</a></div><div class=""><br class=""></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br class=""></div></body></html>