OK<br> there was a problem specifing the iterator region<br> and program didn't enter the loop<br> <img src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/03.gif"><br> thx<br><br><b><i>charfeddine amir &lt;charfeddine_amir@yahoo.fr&gt;</i></b> a écrit&nbsp;:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Hi all,<br> i'm reading pixel value with an iterator, testing if it's equal to 0, if not i enter a loop&nbsp; to do some processing tasks.<br> but the program din't enter to the loop browsing all pixel image, mean he consider that all pixel value are equal to 0, which is not true!<br> could any one tell me where is the problem.<br> thx<br> <br> this the code :<br> <br> <span style="font-weight: bold;">typedef&nbsp;&nbsp; itk::Image&lt;float,3&gt;&nbsp;&nbsp;&nbsp; InputImageType;<br> typedef&nbsp;&nbsp; itk::ImageFileReader&lt; InputImageType &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ImageReaderType;<br> .....<br>
 ConstIteratorType3 out(&nbsp;&nbsp; m_InputImage, m_inputimageregion );</span><br style="font-weight: bold;"> <span style="font-weight: bold;">for ( out.GoToBegin(); !out.IsAtEnd(); ++out)</span><br style="font-weight: bold;"> <span style="font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {</span><br style="font-weight: bold;"> <span style="font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(out.Get()!=0)</span><br style="font-weight: bold;"> <span style="font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {</span><br style="font-weight: bold;"> <span style="font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </span><br style="font-weight: bold;"> <span style="font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pixelIndex=out.GetIndex();</span><br style="font-weight: bold;"> <span style="font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp; std::cout&lt;&lt;"pixel ("&lt;&lt;pixelIndex[0]&lt;&lt;","&lt;&lt;pixelIndex[1]&lt;&lt;") = &lt;&lt;out.Get()&lt;&lt;std::endl;</span><br style="font-weight: bold;"> <span style="font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // Coord du pixel consid‚r‚ dans le plan image en  millimetres.</span><br style="font-weight: bold;"> <span style="font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CoordInRecp[0]=pixelIndex[0]*m_inputimagespacing[0];</span><br style="font-weight: bold;"> <span style="font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CoordInRecp[1]=pixelIndex[1]*m_inputimagespacing[0];</span><br style="font-weight: bold;"> <span style="font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  .......</span><br style="font-weight: bold;"> <span style="font-weight:
 bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  }</span><br style="font-weight: bold;"> <span style="font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;  }</span><br> <div>   </div><hr size="1"> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international. <a href="http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.beta.messenger.yahoo.com">Téléchargez</a> la version beta._______________________________________________<br>Insight-users mailing list<br>Insight-users@itk.org<br>http://www.itk.org/mailman/listinfo/insight-users<br></blockquote><br><p>
                <hr size=1> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
<a href="http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.beta.messenger.yahoo.com">Téléchargez</a> la version beta.