<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" 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 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EstiloCorreo17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

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

<div class=Section1>

<p class=MsoNormal>Hello,<o:p></o:p></p>

<p class=MsoNormal>My name is David. I have RGB images taken from a microscope with
a dynamic range of 2^16. I worked in an algorithm in Matlab and now I have been
trying to use ITK. I have successfully obtained the gray image using the
itkRGBtoLuminanceFilter but now I have problems trying to perform the next
pixel to pixel operation . I want to obtain a binary image that is the result
of this comparison GRAY&lt; RED. For that I have to obtain the red layer of my
image but this is the part where I have been struggling. I am using the
UnaryFunctorImageFilter &nbsp;to get this layer and then use another procedure
to perform the comparison. When I compile my code I don&#8217;t get any errors
but when I see my red layer all I see is a entirely black image. I will thank
you a lot if you could help me. I believe I am not understanding very well the
UnaryFunctorImageFilter and it will help me a lot if you have more examples about
this filter.<o:p></o:p></p>

<p class=MsoNormal>Thank you so much in advance,<o:p></o:p></p>

<p class=MsoNormal>David.<o:p></o:p></p>

<p class=MsoNormal>----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='text-autospace:none'><b><span lang=ES
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>#ifndef</span></b><span
lang=ES style='font-size:10.0pt;font-family:"Courier New";color:black'>
OPERACIONES_H_</span><span lang=ES style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span lang=ES
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>#define</span></b><span
lang=ES style='font-size:10.0pt;font-family:"Courier New";color:black'>
OPERACIONES_H_</span><span lang=ES style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055'>template</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> &lt;</span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>class</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#644632'>TInput</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>,</span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>class</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#644632'>TOutput</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>&gt;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

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

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055'>class</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>operaciones</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> {</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055'>public</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>:</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#644632'>TOutput</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> <b>operator()</b>(
</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>const</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#644632'>TInput</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> &amp; A ) </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>const</span></b><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

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

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>return</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#0000C0'>PixelTub</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>.GetRed();</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

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

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>bool</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> <b>operator!=</b>(</span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>const</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>operaciones</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> &amp;
operacion) </span><b><span style='font-size:10.0pt;font-family:"Courier New";
color:#7F0055'>const</span></b><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>return</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> (</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#0000C0'>PixelTub</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>!=operacion.</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#0000C0'>PixelTub</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>)?</span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>true</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>:</span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>false</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

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

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>bool</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> <b>operator==</b>(</span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>const</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>operaciones</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> &amp;
operacion) </span><b><span style='font-size:10.0pt;font-family:"Courier New";
color:#7F0055'>const</span></b><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>return</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> !(*</span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>this</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>!=operacion);</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
lang=ES style='font-size:10.0pt;font-family:"Courier New";color:black'>}</span><span
lang=ES style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>operaciones</b>()
{}</span><span lang=ES style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
lang=ES style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>virtual</span></b><span
lang=ES style='font-size:10.0pt;font-family:"Courier New";color:black'> <b>~operaciones</b>()
{}</span><span lang=ES style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span lang=ES
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>private</span></b><span
lang=ES style='font-size:10.0pt;font-family:"Courier New";color:black'>:</span><span
lang=ES style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
lang=ES style='font-size:10.0pt;font-family:"Courier New";color:#644632'>TInput</span></b><span
lang=ES style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
lang=ES style='font-size:10.0pt;font-family:"Courier New";color:#0000C0'>PixelTub</span><span
lang=ES style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span><span
lang=ES style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>};</span><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Courier New";
color:#7F0055'>#endif</span></b><span style='font-size:10.0pt;font-family:"Courier New";
color:black'> </span><span style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'>/* OPERACIONES_H_ */</span><o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055'>#include</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&lt;iostream&gt;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055'>#include</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;itkImage.h&quot;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055'>#include</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;itkImageFileReader.h&quot;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055'>#include</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;itkImageFileWriter.h&quot;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055'>#include</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;itkGradientMagnitudeImageFilter.h&quot;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055'>#include</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;itkRescaleIntensityImageFilter.h&quot;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055'>#include</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;itkRGBPixel.h&quot;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055'>#include</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;itkRGBToLuminanceImageFilter.h&quot;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055'>#include</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;operaciones.h&quot;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055'>#include</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;itkUnaryFunctorImageFilter.h&quot;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

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

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055'>int</span></b><span style='font-size:
10.0pt;font-family:"Courier New";color:black'> <b>main</b>( </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>int</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> , </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>char</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> * argv[])</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>{</span><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><b><span style='font-size:
10.0pt;font-family:"Courier New";color:#7F0055'>using</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>namespace</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> std;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

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

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><b><span style='font-size:
10.0pt;font-family:"Courier New";color:#7F0055'>const</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>unsigned</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>int</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Dimension = 2;</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><b><span style='font-size:
10.0pt;font-family:"Courier New";color:#7F0055'>typedef</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>unsigned</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>short</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-size:10.0pt;font-family:"Courier New";color:#005032'>PixelType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

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

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><b><span style='font-size:
10.0pt;font-family:"Courier New";color:#7F0055'>typedef</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> itk::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>RGBPixel</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>&lt; </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>unsigned</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>short</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>&gt;&nbsp; </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>RGBPixelType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><b><span style='font-size:
10.0pt;font-family:"Courier New";color:#7F0055'>typedef</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> itk::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>Image</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>&lt; </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>RGBPixelType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>, Dimension
&gt;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";
color:#005032'>RGBImageType</span><span style='font-size:10.0pt;font-family:
"Courier New";color:black'>;</span><span style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><b><span style='font-size:
10.0pt;font-family:"Courier New";color:#7F0055'>typedef</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> itk::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>ImageFileReader</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>&lt; </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>RGBImageType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> &gt;&nbsp; </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>ReaderType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><b><span style='font-size:
10.0pt;font-family:"Courier New";color:#7F0055'>typedef</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>operaciones</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>&lt;</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>RGBPixelType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>,</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>PixelType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>&gt; </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>TOperaciones</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><b><span style='font-size:
10.0pt;font-family:"Courier New";color:#7F0055'>typedef</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> itk::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>Image</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>&lt; </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>PixelType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>, Dimension
&gt;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";
color:#005032'>GrayImageType</span><span style='font-size:10.0pt;font-family:
"Courier New";color:black'>;</span><span style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><b><span style='font-size:
10.0pt;font-family:"Courier New";color:#7F0055'>typedef</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> itk::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>UnaryFunctorImageFilter</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>&lt;</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>RGBImageType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>,</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>GrayImageType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>,</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>TOperaciones</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>&gt; </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>TFiltroFunctor</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

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

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><span style='font-size:
10.0pt;font-family:"Courier New";color:#005032'>ReaderType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>Pointer</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> lectordeimagen
= </span><span style='font-size:10.0pt;font-family:"Courier New";color:#005032'>ReaderType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>::<i>New</i>();</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

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

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; lectordeimagen-&gt;SetFileName(</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;C:\\Documents
and Settings\\David1\\Desktop\\Tuberculosis\\Prueba1\\Foto003_1.TIF&quot;</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; lectordeimagen-&gt;</span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#642880'>Update</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>();</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; cout&lt;&lt;</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;<u>Imagen</u>
<u>Leida</u> .\n&quot;</span><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>;</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><span style='font-size:
10.0pt;font-family:"Courier New";color:#005032'>RGBImageType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>Pointer</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>
imagen=lectordeimagen-&gt;GetOutput();</span><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><span style='font-size:
10.0pt;font-family:"Courier New";color:#005032'>RGBImageType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>RegionType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>
region=imagen-&gt;GetLargestPossibleRegion();</span><span style='font-size:
10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><span style='font-size:
10.0pt;font-family:"Courier New";color:#005032'>RGBImageType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>SizeType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>
size=region.GetSize();</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

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

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><b><span style='font-size:
10.0pt;font-family:"Courier New";color:#7F0055'>int</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> f,c;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; f=size[0];</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><span lang=ES
style='font-size:10.0pt;font-family:"Courier New";color:black'>c=size[1];</span><span
lang=ES style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New";color:black'>&nbsp; cout&lt;&lt;</span><span
lang=ES style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;<u>La</u>
<u>imagen</u> <u>tiene</u> &quot;</span><span lang=ES style='font-size:10.0pt;
font-family:"Courier New";color:black'>&lt;&lt;f&lt;&lt;</span><span lang=ES
style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot; <u>pixeles</u>
<u>por</u> &quot;</span><span lang=ES style='font-size:10.0pt;font-family:"Courier New";
color:black'> &lt;&lt; c&lt;&lt; </span><span lang=ES style='font-size:10.0pt;
font-family:"Courier New";color:#2A00FF'>&quot; <u>pixeles</u> .\n&quot;</span><span
lang=ES style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span><span
lang=ES style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New";color:black'>&nbsp; </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>typedef</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> itk::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>RGBToLuminanceImageFilter</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>&lt;</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>RGBImageType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>,</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>GrayImageType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>&gt; </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>GrayRescaleFilterType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><span style='font-size:
10.0pt;font-family:"Courier New";color:#005032'>GrayRescaleFilterType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>Pointer</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> filter=</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>GrayRescaleFilterType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>::<i>New</i>();</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;
filter-&gt;SetInput(lectordeimagen-&gt;GetOutput());</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><b><span style='font-size:
10.0pt;font-family:"Courier New";color:#7F0055'>typedef</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> itk::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>ImageFileWriter</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>&lt;</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>GrayImageType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>&gt; </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>WriterType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><span style='font-size:
10.0pt;font-family:"Courier New";color:#005032'>WriterType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>Pointer</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>
escritordeimagen = </span><span style='font-size:10.0pt;font-family:"Courier New";
color:#005032'>WriterType</span><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>::<i>New</i>();</span><span style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><span style='font-size:
10.0pt;font-family:"Courier New";color:#005032'>WriterType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>Pointer</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>
escritordeimagen2 = </span><span style='font-size:10.0pt;font-family:"Courier New";
color:#005032'>WriterType</span><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>::<i>New</i>();</span><span style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></p>

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

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;
escritordeimagen-&gt;SetInput( filter-&gt;GetOutput());</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;
escritordeimagen-&gt;SetFileName(</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#2A00FF'>&quot;C:\\Documents and
Settings\\David1\\Desktop\\Tuberculosis\\Prueba1\\Foto003_1gray2.<u>tif</u>&quot;</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp; </span><span lang=ES
style='font-size:10.0pt;font-family:"Courier New";color:black'>escritordeimagen-&gt;Update();</span><span
lang=ES style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp; cout&lt;&lt;</span><span
lang=ES style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;<u>Imagen</u>
<u>en</u> <u>Grises</u> <u>hecha</u> .\n&quot;</span><span lang=ES
style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span><span
lang=ES style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New";color:black'>&nbsp;</span><span lang=ES
style='font-size:10.0pt;font-family:"Courier New";color:#3F7F5F'>//CREAMOS UNA
IMAGEN Y RECORREMOS LLENANDOLA CON EL RED</span><span lang=ES style='font-size:
10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp; </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>GrayImageType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>Pointer</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> capaR= </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>GrayImageType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>::<i>New</i>();</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp; </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>GrayImageType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>IndexType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> comienzo;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp; </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>GrayImageType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>SizeType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> tamano;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp; </span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>GrayImageType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>RegionType</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> region2;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

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

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; comienzo.Fill(0);</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp; </span><span lang=ES
style='font-size:10.0pt;font-family:"Courier New";color:black'>tamano[0]=f;</span><span
lang=ES style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New";color:black'>&nbsp; tamano[1]=c;</span><span
lang=ES style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;
capaR-&gt;SetRegions(region2);</span><span lang=ES style='font-size:10.0pt;
font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;
capaR-&gt;Allocate();</span><span lang=ES style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New";color:black'>&nbsp;cout&lt;&lt;</span><span
lang=ES style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;<u>Listo</u>
<u>para</u> <u>capa</u> <u>roja</u>.\n&quot;</span><span lang=ES
style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span><span
lang=ES style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:#005032'>TFiltroFunctor</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>::</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>Pointer</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> filtro=</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#005032'>TFiltroFunctor</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>::<i>New</i>();</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

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

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>filtro-&gt;SetInput(lectordeimagen-&gt;GetOutput());</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>escritordeimagen-&gt;SetInput(filtro-&gt;GetOutput());</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>escritordeimagen-&gt;SetFileName(</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;C:\\Documents
and Settings\\David1\\Desktop\\Tuberculosis\\Prueba1\\Foto003_1Rojo.tif&quot;</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New";color:black'>escritordeimagen-&gt;Update();</span><span
lang=ES style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New";color:black'>cout&lt;&lt;</span><span lang=ES
style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;<u>capa</u>
<u>roja</u> <u>lista</u>.\n&quot;</span><span lang=ES style='font-size:10.0pt;
font-family:"Courier New";color:black'>;</span><span lang=ES style='font-size:
10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=ES style='font-size:
10.0pt;font-family:"Courier New";color:black'>&nbsp; </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>return</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> 0;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>}</span><o:p></o:p></p>

</div>

</body>

</html>