[Insight-developers] itkImageMomentCalculatorTest
Luis Ibanez
luis.ibanez@kitware.com
Thu, 28 Feb 2002 11:00:06 -0500
Hi
The error in itkImageMomentCalculatorTest resulted
to be a trace of the removal of the comma list initialization
syntax for vectors.
Theoretical values for the moments were entered like
momentVector = 1.5, 2.5, 1.25;
the momentVector variable end up with values:
1.5, 1.5, 1.5 !!!
because one of the initializers performs a Fill() operation
and instructions after the "," are considered to be a separate
statements and...
1.5;
is a valid statement !!
It does nothing, but the compiler seems to be happy with it.
something like:
int a;
a;
a;
Also passes smoothly through compilation.
=====
So, any traces of the comma list initializer like
vv = 1.3, 2.4, 5.6;
will be read by the compiler as:
vv.Fill( 1.3 );
2.4;
5.6;
and notations like
vv = x, y, z;
will be interpreted as:
vv.Fill( x );
y;
z;
===
Luis