<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> </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> </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'>
<vnl/vnl_matrix.h><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></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><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'> <font
color=blue><span style='color:blue'>unsigned</span></font> <font color=blue><span
style='color:blue'>int</span></font> 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'> <font
color=blue><span style='color:blue'>unsigned</span></font> <font color=blue><span
style='color:blue'>int</span></font> 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'> vnl_matrix<<font
color=blue><span style='color:blue'>unsigned</span></font> <font color=blue><span
style='color:blue'>short</span></font>> 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> </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'> 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'> <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<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'> <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<lWidth; 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'> {<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'> 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'> ++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'> }<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'>…</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> </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 “watch” 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'>“</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'>”</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'>“</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'>”</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> </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> </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> </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> </o:p></span></font></p>
</div>
</body>
</html>