[Insight-developers] VNL and MSVC 6.0

William A. Hoffman bill.hoffman@kitware.com
Mon, 17 Mar 2003 21:58:25 -0500


On the positive side, the vnl_vector_fixed no longer has an extra 8 bytes 
of storage.
However, it no longer inherits from vnl_vector, but can be easily converted 
to one by
calling as_ref().   Same thing goes for vnl_matrix_fixed.   So, for 2, I 
would think that:
the following should work:

vnl_matrix_inverse<double>(matrix1) * (matrix2.as_ref());


-Bill

At 02:18 PM 3/17/2003 -0500, Robert Tamburo wrote:
>Perhaps this is not the correct place for this. I had a couple of new 
>experiences with the upgrade of VNL and Microsoft Visual Studio 6.0. I 
>thought that I would share them in case someone is encountering the same 
>issues.
>
>Basically, some former functionality syntax for vnl_vector_fixed, and 
>vnl_matrix_inverse are no longer valid (from what I could figure out):
>
>1. Cross product of two vnl_vector_fixed vectors
>Formerly:
>vnl_vector<double, 3> vector1;
>vnl_vector<double, 3> vector2;
>cross_3d( vector1, vector2 );
>
>Currently:
>cross_3d( vector1.as_ref(), vector2.as_ref() );
>
>2. The * operator for vnl_matrix_fixed
>There is a known issue for this operator on MSVC6.0 and there is a 
>workaround built into vnl_matrix_fixed. Multiplying two vnl_matrix_fixed 
>matrices is taken care of by this fix. However, I am multiplying a 
>vnl_matrix_inverse and vnl_matrix_fixed and it seems that the workaround fails.
>
>Formerly:
>vnl_matrix_fixed<double, 4, 4>  matrix1;
>vnl_matrix_fixed<double, 4, 4>  matrix2;
>vnl_matrix_fixed<double, 4, 4>  matrix3;
>matrix3 = vnl_matrix_inverse<double>(matrix1) * (matrix2);
>
>Currently:
>matrix3 = vnl_svd<double>(matrix1) * (matrix2);
>
>