<meta http-equiv="content-type" content="text/html; charset=utf-8"><div class="gmail_quote">On Wed, Mar 2, 2011 at 10:06 AM, john smith <span dir="ltr">&lt;<a href="mailto:mkitkinsightuser@gmail.com">mkitkinsightuser@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello,<br><br>I am trying to create an image 20x20. Every pixel will have the value 0. Then, I have created an other function called OutputImage, with which I trying to see all the pixel&#39;s value on my window command prompt. The project is built correctly, but when I run it from the command window prompt I do not take any value. Could anybody find the problem?<br>

<br>Thanks in advance<br><br></blockquote><div><br></div><div>You should probably use a region iterator for your output function:</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://www.itk.org/Wiki/ITK/Examples/Iterators/ImageRegionConstIterator">http://www.itk.org/Wiki/ITK/Examples/Iterators/ImageRegionConstIterator</a><br clear="all">
<br></div><div class="gmail_quote">Also, you&#39;ll need to cast the unsigned char to an int to view the value &quot;0&quot;:</div><div class="gmail_quote"><br></div><div class="gmail_quote"><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">std::cout &lt;&lt; static_cast&lt;int&gt;(image-&gt;GetPixel(pixelIndex));</span></div>
<div class="gmail_quote"><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div class="gmail_quote"><div>David </div></div>