<font><font face="verdana,sans-serif">I also saw this warning recently, from the block that "never gets called". And it only happened in release version of my program.<br></font></font><br><div class="gmail_quote">
On Tue, Jan 31, 2012 at 00:48, Maarten Beek <span dir="ltr"><<a href="mailto:beekmaarten@yahoo.com">beekmaarten@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><div><span>Hi David,<br>
</span></div>
<div><br></div><div>Ai, seems these crashes are hard to get rid off....<br></div><div><br>
</div>
<div>I currently use VTK within Amira modules.</div>
<div><br>
</div>
<div>I changed the type of vtkPoints
from the default VTK_FLOAT to VTK_DOUBLE when I convert an Amira object
to a VTK object. This reduces the occurrences of the errors, but doesn't
solve the issue.</div>
<div>(Ps: why is the default in vtkPoints still float, while everywhere else floats were changed into doubles a long while ago?)<br>
</div>
<div><br>
</div>
<div><span>I don't really know much about different optimizations, so I just copy-paste what I found in MSVS:</span></div>
<div><span><br>
</span></div>
<div><span>I build my VTK with:<br>
</span></div>
<div><span>/O2
/Ob2 /FD /EHsc /MD /Fo"vtkCommon.dir\Release\\"
/Fd"G:\vtk-5.6.0\build_vs90_noQt\bin\Release/vtkCommon.pdb" /W4 /nologo
/c /TP /errorReport:prompt/Zm 1000 and a couple of '/I'-s and '/D'-s<br></span></div>
<div><br>
</div>
<div>I build my Amira modules with:</div>
<div>/O2 /Ob1 /Oi /Oy /GF /FD /EHsc /MD
/GS- /Gy /fp:fast /openmp
/Fo"./../../obj/arch-Win64VC9-Optimize/GraphPackage/"
/Fd"./../.././bin/arch-Win64VC9-Optimize/GraphPackage.pdb" /W3 /nologo
/c /Zi /wd4068 /wd4305 /wd4018 /wd4244 /wd4800 /wd4275 /wd4251
/errorReport:prompt and a couple <span>of '/I'-s and '/D'-s</span></div>
<div><br>
<span></span></div>
<div><span>I
am working on getting vtkMath::JacobiN to print the matrix in the
if-loop that 'gets never called' using vtkGenericWarningMacro to avoid
having to include Amira stuff. Having a hard time getting that to work. (
char* test = "hello";vtkGenericWarningMacro( test ); won't do the trick). Any suggestions?<span class="HOEnZb"><font color="#888888"><br>
</font></span></span></div><span class="HOEnZb"><font color="#888888">
<div><br>
<span></span></div>
<div><span>Maarten</span></div></font></span><div><br></div><div class="hm HOEnZb"> </div><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div class="hm HOEnZb"> </div><div style="font-family:times new roman,new york,times,serif;font-size:12pt">
<div class="hm HOEnZb"> <div dir="ltr"> <font face="Arial"> <hr size="1"> <b><span style="font-weight:bold">From:</span></b> David Gobbi <<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>><br>
<b><span style="font-weight:bold">To:</span></b> Maarten Beek <<a href="mailto:beekmaarten@yahoo.com" target="_blank">beekmaarten@yahoo.com</a>> <br><b><span style="font-weight:bold">Cc:</span></b> VTK list <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>> <br>
<b><span style="font-weight:bold">Sent:</span></b> Monday, January 30, 2012 2:31:38 PM<br> <b><span style="font-weight:bold">Subject:</span></b> Re: [vtkusers] ICP Error: vtkMath::Jacobi: Error extracting eigenfunctions<br>
</font> </div></div><div><div class="h5"> <br>Hi Maarten,<br><br>I think there are two issues here, one is that vtkLandmarkTransform<br>should have a check as you have described, but another
potentially<br>serious issue is that, as far as I understand it, JacobiN should never<br>fail. I did a google search and found a message from 2002 by the<br>Numerical Recipes authors stating that the NR Jacobi code can become<br>
numerically unstable due to certain compiler optimizations. I'm<br>guessing that certain compiler optimizations could similarly make the<br>VTK Jacobi code become unstable.<br><a href="http://www.nr.com/forum/showthread.php?p=4913" target="_blank">http://www.nr.com/forum/showthread.php?p=4913</a><br>
<br>Can you provide info about your compiler/flags etc? Also, is it<br>possible to get your code to print a matrix that causes JacobiN to<br>fail?<br><br> - David<br><br><br>On Mon, Jan 30, 2012 at 9:44 AM, Maarten Beek <<a href="mailto:beekmaarten@yahoo.com" target="_blank">beekmaarten@yahoo.com</a>> wrote:<br>
> Hi all,<br>><br>> I get the following warning when using
ICP:<br>><br>> vtkMath::Jacobi: Error extracting eigenfunctions<br>><br>> It comes from vtkMath::vtkJacobiN that calculates the eigenvalues, -vectors<br>> of a matrix.<br>> The function returns 0, when this error occurs (otherwise 1), but<br>
> vtkLandmarkTransform doesn't check for the return value and thus uses<br>> undefined values for the eigenvalues, -vectors.<br>> This means my point set becomes invalid.<br>> I believe the way to avoid this error is to 'giggle' the coordinates a<br>
> little when it happens, but how can I intervene when vtkLandmarkTransform<br>> stubbornly uses whatever values it gets from vtkMath::vtkJacobiN?<br>> Is there a way to intercept the error message?<br>><br>> I also noticed that if I apply ICP on A and B1 resulting in the error<br>
> message, applying ICP on A and B2 (loading the same data file that gives me<br>> B1) works fine. I don't see vtkMath::vtkJacobiN using a
random number or<br>> doing something similar, which makes me believe the error message I get is<br>> due to floating point accuracy? Even more a reason to think that 'giggling'<br>> might work (if I were able to intervene before the invalid transform is<br>
> applied to my data...)<br>><br>> Thanks - Maarten<br><br><br> </div></div></div> </div> </div></div><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 <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>