<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: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:NSimSun;
        panose-1:2 1 6 9 3 1 1 1 1 1;}
@font-face
        {font-family:NSimSun;
        panose-1:2 1 6 9 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 developers 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 defined a template function:<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'>template</span></font><font
size=2 face=Fixedsys><span style='font-size:10.0pt;font-family:Fixedsys'><<font
color=blue><span style='color:blue'>class</span></font> InputArrayType, <font
color=blue><span style='color:blue'>class</span></font> OutputArrayType> <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'>void</span></font><font
size=2 face=Fixedsys><span style='font-size:10.0pt;font-family:Fixedsys'>
myPyramid(itk::Array2D< InputArrayType > in, itk::Array2D<
OutputArrayType > out, <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> nRows) ;<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'>and used it in the main file:<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'>typedef</span></font> <font color=blue><span
style='color:blue'>signed</span></font> <font color=blue><span
style='color:blue'>short</span></font> InputPixelType;<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=2
color=blue face=Fixedsys><span style='font-size:10.0pt;font-family:Fixedsys;
color:blue'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=2
color=blue face=Fixedsys><span style='font-size:10.0pt;font-family:Fixedsys;
color:blue'>typedef</span></font><font size=2 face=Fixedsys><span
style='font-size:10.0pt;font-family:Fixedsys'> itk::Array2D<
InputPixelType > InputArray2D ;<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'> InputArray2D
inputImageArray2D( lWidth, lHeight ) ;<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'>typedef</span></font> itk::Array2D<
<font color=blue><span style='color:blue'>float</span></font> > FloatArray2D
;<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'> FloatArray2D outputImageArray2D(
lWidth/2, lHeight/2 ) ;<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'> myPyramid(
inputImageArray2D, outputImageArray2D, (<font color=blue><span
style='color:blue'>unsigned</span></font> <font color=blue><span
style='color:blue'>int</span></font>)lWidth, (<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><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'>but a link error displays:<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=新宋体><span
style='font-size:11.0pt;font-family:NSimSun'>DicomImageReadWrite.obj : error
LNK2019: unresolved external symbol "void __cdecl myPyramid(class
itk::Array2D<short>,class itk::Array2D<float>,unsigned int,unsigned
int)" (?myPyramid@@YAXV?$Array2D@F@itk@@V?$Array2D@M@2@II@Z) referenced in
function _main<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face=新宋体><span
style='font-size:11.0pt;font-family:NSimSun'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face=新宋体><span
style='font-size:11.0pt;font-family:NSimSun'>Debug\DicomImageReadWrite.exe :
fatal error LNK1120: 1 unresolved externals<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'>Would you please help me to find where the problem is and
how to fix it? 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>
</div>
</body>
</html>