<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Fixedsys;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"\@Fixedsys";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Dear ITK developer and users;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I am trying to read and access elements of vnl_matrix data
by using the following code:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=blue
face=Fixedsys><span style='font-size:10.0pt;font-family:Fixedsys;color:blue'>#include</span></font><font
size=2 face=Fixedsys><span style='font-size:10.0pt;font-family:Fixedsys'>
&lt;vnl/vnl_matrix.h&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&#8230;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Fixedsys><span
style='font-size:10.0pt;font-family:Fixedsys'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font
color=blue><span style='color:blue'>unsigned</span></font> <font color=blue><span
style='color:blue'>int</span></font>&nbsp; nRows = (<font color=blue><span
style='color:blue'>unsigned</span></font> <font color=blue><span
style='color:blue'>int</span></font>)lHeight ;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Fixedsys><span
style='font-size:10.0pt;font-family:Fixedsys'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font
color=blue><span style='color:blue'>unsigned</span></font> <font color=blue><span
style='color:blue'>int</span></font>&nbsp; nColumns = (<font color=blue><span
style='color:blue'>unsigned</span></font> <font color=blue><span
style='color:blue'>int</span></font>)lWidth ;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Fixedsys><span
style='font-size:10.0pt;font-family:Fixedsys'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vnl_matrix&lt;<font
color=blue><span style='color:blue'>unsigned</span></font> <font color=blue><span
style='color:blue'>short</span></font>&gt; inputMatrix( nRows, nColumns ) ;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Fixedsys><span
style='font-size:10.0pt;font-family:Fixedsys'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Fixedsys><span
style='font-size:10.0pt;font-family:Fixedsys'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; it.GoToBegin();<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Fixedsys><span
style='font-size:10.0pt;font-family:Fixedsys'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font
color=blue><span style='color:blue'>for</span></font>(<font color=blue><span
style='color:blue'>unsigned</span></font> <font color=blue><span
style='color:blue'>int</span></font> i=0; i&lt;lHeight; i++)<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Fixedsys><span
style='font-size:10.0pt;font-family:Fixedsys'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font
color=blue><span style='color:blue'>for</span></font>(<font color=blue><span
style='color:blue'>unsigned</span></font> <font color=blue><span
style='color:blue'>int</span></font> j=0; j&lt;lWidth;&nbsp; j++)<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Fixedsys><span
style='font-size:10.0pt;font-family:Fixedsys'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Fixedsys><span
style='font-size:10.0pt;font-family:Fixedsys'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inputMatrix[i][j]
= it.Get() ;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Fixedsys><span
style='font-size:10.0pt;font-family:Fixedsys'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ++it
;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Fixedsys><span style='font-size:10.0pt;
font-family:Fixedsys'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'>&#8230;</span></font><font size=2 face=Fixedsys><span style='font-size:
10.0pt;font-family:Fixedsys'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Fixedsys><span style='font-size:10.0pt;
font-family:Fixedsys'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>It was compiled successfully, but when I try to check the
elements of the matrix using &#8220;watch&#8221; function, some error
displayed:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>When I use </span></font><font size=2 color=green
face=Fixedsys><span style='font-size:10.0pt;font-family:Fixedsys;color:green'>inputMatrix[i][j]</span></font><font
size=2 face=Fixedsys><span style='font-size:10.0pt;font-family:Fixedsys'>, </span></font><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>an error
displays</span></font><font size=2 face=Fixedsys><span style='font-size:10.0pt;
font-family:Fixedsys'>: </span></font><font size=2><span style='font-size:10.0pt'>&#8220;</span></font><font
size=2 color=green face=Fixedsys><span style='font-size:10.0pt;font-family:
Fixedsys;color:green'>CXX0058: Error: overloaded operator not found</span></font><font
size=2><span style='font-size:10.0pt'>&#8221;</span></font><font size=2
face=Fixedsys><span style='font-size:10.0pt;font-family:Fixedsys'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>When I use</span></font><font size=2 face=Fixedsys><span
style='font-size:10.0pt;font-family:Fixedsys'> <font color=green><span
style='color:green'>inputMatrix(i,j)</span></font>, </span></font><font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial'>an error displays</span></font><font
size=2 face=Fixedsys><span style='font-size:10.0pt;font-family:Fixedsys'>: </span></font><font
size=2><span style='font-size:10.0pt'>&#8220;</span></font><font size=2
color=green face=Fixedsys><span style='font-size:10.0pt;font-family:Fixedsys;
color:green'>CXX0059: Error: left operand is class not a function name</span></font><font
size=2 color=green><span style='font-size:10.0pt;color:green'>&#8221;</span></font><font
size=2 color=green face=Fixedsys><span style='font-size:10.0pt;font-family:
Fixedsys;color:green'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=green face=Fixedsys><span
style='font-size:10.0pt;font-family:Fixedsys;color:green'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I am confused of these errors. Could you please teach me how
to fix it? Did I miss some header files or not? <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Your kind help is greatly appreciated.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Best regards,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Sam<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>