[Insight-developers] Tolerance on Rigid2DTransform

Stephen R. Aylward aylward at unc.edu
Tue, 23 Mar 2004 09:48:19 -0500


I agree with improving the precision of metaIO as an option.

My only concern is that we are addressing a very special case.   Most of 
our computations don't need 12 digits (it is rare to have any analysis 
produce 12 significant digits), using binary makes the file uneditable, 
and always writing 12 digits is misleading and a waste of space most of 
the time (to write 12 digits implies 12 significant digits, and 
generally we don't write PI :) ).

Perhaps we could add a member function to the group/transform writer to 
specify the number of digits to write for a transform?   That way it is 
burried in the one subclass that might need it.   Or am I being naive 
about how often (where and when) we need this amount of precision?

Thanks,
Stephen

Miller, James V (Research) wrote:
> Julien,
>  
> The CVS log for Rigid2DTransform says that you adjusted the tolerance 
> for the test for orthogonality because a transform written with MetaIO 
> was loosing too much precision on write (or read) operation that it was 
> no longer orthogonal when re-imported.
>  
> Instead of changing the orthogonality test, can you change the MetaIO to 
> write the transform with greater precision?  The best option would be to 
> write the transform out in binary (no loss of precision).  If the format 
> needs to be ASCII, you can write a greater number of decimal places 
> (something extreme like 12 or 20).
>  
> I have been burnt in the past in a shape inspection project by a 
> transform loosing precision when written to disk.  I was trying to 
> measure deviations to under 0.001 inches.  The loss in precision which 
> caused the transforms to no longer be orthogonal meant that portions of 
> my geometry were being warped (non-rigidly) to be outside my 
> tolerances.  Eventually, I tracked down the problem to the calibration 
> system storing the transforms in ASCII (single precision). Due to the 
> legacy of the application, I couldn't make the switch to a binary format 
> for the transform.  But increasing the number of decimal places in the 
> ASCII formats gave the application just enough precision room to perform 
> properly.
>  
>  
> 
> *Jim Miller*
> */_____________________________________/*
> /Visualization & Computer Vision//
> /GE Research/
> /Bldg. KW, Room C218B/
> /P.O. Box 8, Schenectady NY 12301/
> 
> //_millerjv at research.ge.com <mailto:millerjv at research.ge.com>_/
> 
> /_james.miller at research.ge.com_/
> /(518) 387-4005, Dial Comm: 8*833-4005, /
> /Cell: (518) 505-7065, Fax: (518) 387-6981/
> 
>  

-- 
===========================================================
Dr. Stephen R. Aylward
Associate Professor of Radiology
Adjunct Associate Professor of Computer Science and Surgery
http://caddlab.rad.unc.edu
aylward at unc.edu
(919) 966-9695