[Insight-developers] Rotational Epsilon Tolerance

Johnson, Hans J hans-johnson at uiowa.edu
Tue Oct 25 12:33:11 EDT 2011


In many places in ITK there is an epsilon tolerance of 1e-10.

git grep "epsilon.*1e-10"|wc -l   --> 26 times

in   itkVersor.hxx, however, the epsilon is set to
"const T epsilon = vcl_numeric_limits< T >::epsilon();"  --> 2.22045e-16

This results in an exception being thrown for conversion from other more generic rigid transform types (Euler, Rigid3D,...) to the Versor3D version.

== START Example ============================================================
 itk::ExceptionObject (0x10167c450)
 Location: "void itk::Versor<T>::Set(const itk::Matrix<T, 3u, 3u>&) [with T = double]"
 File: /scratch/johnsonhj/src/clean_build/ITKv4/Modules/Core/Common/include/itkVersor.hxx
 Line: 418
 Description: itk::ERROR: The following matrix does not represent rotation to within an epsion of 2.22045e-16.
 0.996874 0.0428689 0.0663705
 -0.0256879 0.970224 -0.240843
 -0.0747189 0.238385 0.968292

 det(m * m transpose) is: 1
 m * m transpose is:
 1 3.46945e-18 0
 3.46945e-18 1 3.05311e-16
 0 3.05311e-16 1
== STOP Example ============================================================


1)  I have seen epsilon value like this as set to
       vnl_sqrt(   vcl_numeric_limits< T >::epsilon() )    --> 1.4e-8  (for double).

I have no rational for this being a good magic number, but it does "feel" nice.

Does anyone have an objection to making these epsilons more consistent?
Are there any suggestions or comments on making the consistent value vnl_sqrt(   vcl_numeric_limits< T >::epsilon() )
============================================================================



--
Hans J. Johnson, Ph.D.
hans-johnson at uiowa.edu<mailto:hans-johnson at uiowa.edu>
Assistant Professor of Psychiatry
University of Iowa Carver College of Medicine
W278 GH, 200 Hawkins Drive
Iowa City, Iowa 52242
Phone:  319-353-8587


________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20111025/d106b0a0/attachment.htm>


More information about the Insight-developers mailing list