<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><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?<br>
</span></div>
<div><br>
<span></span></div>
<div><span>Maarten</span></div><div><br></div> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> David Gobbi <david.gobbi@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Maarten Beek <beekmaarten@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> VTK list <vtkusers@vtk.org> <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> <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 ymailto="mailto:beekmaarten@yahoo.com" href="mailto:beekmaarten@yahoo.com">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></body></html>