[Insight-developers] VNL and MSVC 6.0

Robert Tamburo rjtst21@pitt.edu
Mon, 17 Mar 2003 14:18:51 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_0096_01C2EC90.2226F760
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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.=20

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 =3D vnl_matrix_inverse<double>(matrix1) * (matrix2);

Currently:
matrix3 =3D vnl_svd<double>(matrix1) * (matrix2);


------=_NextPart_000_0096_01C2EC90.2226F760
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1141" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Perhaps this is not the correct place =
for this. I=20
had a couple of new experiences with the upgrade of VNL and Microsoft =
Visual=20
Studio 6.0.&nbsp;I thought that I would share them in case someone is=20
encountering the same issues.&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Basically, some former functionality =
syntax for=20
vnl_vector_fixed,&nbsp;and vnl_matrix_inverse are no longer valid (from =
what I=20
could figure out):</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>1.&nbsp;Cross product of two=20
vnl_vector_fixed&nbsp;vectors</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Formerly:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>vnl_vector&lt;double, 3&gt; =
vector1;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>vnl_vector&lt;double, 3&gt; =
vector2;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>cross_3d( vector1, vector2 =
);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Currently:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>cross_3d( vector1.as_ref(), =
vector2.as_ref()=20
);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>2. The * operator for =
vnl_matrix_fixed</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>There is a known issue for this =
operator on MSVC6.0=20
and there is a workaround built into vnl_matrix_fixed. Multiplying two=20
vnl_matrix_fixed matrices is taken care of by this fix. However, I am=20
multiplying a vnl_matrix_inverse and vnl_matrix_fixed and it seems that =
the=20
workaround fails.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Formerly:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> vnl_matrix_fixed&lt;double, 4, =
4&gt;&nbsp;=20
matrix1;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>vnl_matrix_fixed&lt;double, 4, =
4&gt;&nbsp;=20
matrix2;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>vnl_matrix_fixed&lt;double, 4, =
4&gt;&nbsp;=20
matrix3;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>matrix3 =3D =
vnl_matrix_inverse&lt;double&gt;(matrix1)=20
* (matrix2);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Currently:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>matrix3&nbsp;=3D =
vnl_svd&lt;double&gt;(matrix1) *=20
(matrix2);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0096_01C2EC90.2226F760--