<span style="font-weight: bold; color: rgb(64, 64, 255);">Hi all</span><br style="font-weight: bold; color: rgb(64, 64, 255);"> <span style="font-weight: bold; color: rgb(64, 64, 255);">I'm reading Dicom file containing many slice, from which i extract one slice.</span><br style="font-weight: bold; color: rgb(64, 64, 255);"> <span style="font-weight: bold; color: rgb(64, 64, 255);">when i try to show the contenent of the image extracted (pixel value) using iterators i get a black screen, and when i try GetPixel method( which is too slow), i can show the value.</span><br style="font-weight: bold; color: rgb(64, 64, 255);"> <span style="font-weight: bold; color: rgb(64, 64, 255);">did i make a mistake somewhere!</span><br style="font-weight: bold; color: rgb(64, 64, 255);"> <br style="font-weight: bold; color: rgb(64, 64, 255);"> <span style="font-weight: bold; color: rgb(64, 64, 255);">this is the code <br> <br> </span><span style="font-weight:
 bold;">/************************************************************************************/</span><br style="font-weight: bold;"> <span style="font-weight: bold;">typedef&nbsp;&nbsp; itk::Image&lt;float,3&gt;&nbsp;&nbsp;&nbsp; InputImageType;</span><br style="font-weight: bold;"> <span style="font-weight: bold;">typedef itk::Image&lt; float, 2 &gt; DiasstolImageType;</span><br style="font-weight: bold;"> <br style="font-weight: bold;"> <span style="font-weight: bold;">typedef itk::ImageRegionConstIterator&lt; InputImageType &gt; ConstIteratorType;</span><br style="font-weight: bold;"> <span style="font-weight: bold;">typedef itk::ImageRegionIterator&lt; DiasstolImageType&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IteratorType;</span><br style="font-weight: bold;"> <br style="font-weight: bold;"> <span style="font-weight: bold;">.....</span><br style="font-weight: bold;"> <span style="font-weight: bold;">m_thresholdregion=m_OutputImage-&gt;GetLargestPossibleRegion();</span><br
 style="font-weight: bold;"> <span style="font-weight: bold;">ThresholdedImageType::SizeType m_thresholdregionsize= m_thresholdregion.GetSize();</span><br style="font-weight: bold;"> <span style="font-weight: bold;">m_thresholdregionsize[2]=0;</span><br style="font-weight: bold;"> <br style="font-weight: bold;"> <span style="font-weight: bold;">ThresholdedImageType::IndexType m_thresholdregionstart = m_thresholdregion.GetIndex();</span><br style="font-weight: bold;"> <span style="font-weight: bold;">m_thresholdregionstart[2]=slicenumber;</span><br style="font-weight: bold;"> <br style="font-weight: bold;"> <span style="font-weight: bold;">m_thresholddesiredregion.SetSize( m_thresholdregionsize );</span><br style="font-weight: bold;"> <span style="font-weight: bold;">m_thresholddesiredregion.SetIndex( m_thresholdregionstart );</span><br style="font-weight: bold;"> <br style="font-weight: bold;"> <br style="font-weight: bold;"> <span style="font-weight:
 bold;">std::cout&lt;&lt;std::endl&lt;&lt;"----------------------------------&gt;incidence N°"&lt;&lt;card&lt;&lt;std::endl;</span><br style="font-weight: bold;"> <br style="font-weight: bold;"> <br style="font-weight: bold;"> <span style="font-weight: bold;">ConstIteratorType in(&nbsp;&nbsp; m_OutputImage, m_thresholddesiredregion );</span><br style="font-weight: bold;"> <span style="font-weight: bold;">IteratorType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out(&nbsp; m_DiasstoledImage, m_diasstoledimageregion );</span><br style="font-weight: bold;"> <span style="font-weight: bold;">for ( in.GoToBegin(), out.GoToBegin(); !in.IsAtEnd(); ++in, ++out)</span><br style="font-weight: bold;"> <span style="font-weight: bold;">&nbsp; {</span><br style="font-weight: bold;"> <span style="font-weight: bold;">&nbsp; out.Set( in.Get() );</span><br style="font-weight: bold;"> <span style="font-weight: bold;">&nbsp; std::cout&lt;&lt;in.Get()&lt;&lt;" - ";</span><br style="font-weight: bold;"> <span
 style="font-weight: bold;">&nbsp; }</span><br style="font-weight: bold;"> <br style="font-weight: bold;"> <span style="font-weight: bold;">/*******************************************************************************/</span><br> <span style="color: rgb(64, 64, 255); font-weight: bold;">i get this screen on execution:</span><br> <br> <span style="font-weight: bold;">La diasstole de l'incidence courante est l'image 0</span><br style="font-weight: bold;"> <br style="font-weight: bold;"> <span style="font-weight: bold;">----------------------------------&gt;incidence N°0</span><br style="font-weight: bold;"> <br style="font-weight: bold;"> <span style="font-weight: bold;">**********************************Incidence suivante****************************</span><br style="font-weight: bold;"> <br style="font-weight: bold;"> <span style="font-weight: bold;">La diasstole de l'incidence courante est l'image 0</span><br style="font-weight: bold;"> <br style="font-weight: bold;"> <span
 style="font-weight: bold;">----------------------------------&gt;incidence N°1</span><br style="font-weight: bold;"> <br style="font-weight: bold;"> <span style="font-weight: bold;">**********************************Incidence suivante****************************</span><br style="font-weight: bold;"> <br style="font-weight: bold;"> <span style="font-weight: bold;">/*******************************************************************************************/</span><br> <span style="color: rgb(64, 64, 255); font-weight: bold;">But if remplace the use of iterators loop with this classic one :</span><br> <br> <span style="font-weight: bold;"> pixelIndex[2]=slicenumber;</span><br style="font-weight: bold;">  <span style="font-weight: bold;">for(j=0; j&lt;m_inputimagesize[1]; j++)</span><br style="font-weight: bold;"> <span style="font-weight: bold;"> &nbsp;&nbsp;&nbsp;&nbsp; {</span><br style="font-weight: bold;"> <span style="font-weight: bold;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 pixelIndex[1]=j;</span><br style="font-weight: bold;"> <span style="font-weight: bold;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_diasstoledimageindex[1]=j;</span><br style="font-weight: bold;"> <span style="font-weight: bold;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for(i=0; i&lt;m_inputimagesize[0]; i++)</span><br style="font-weight: bold;"> <span style="font-weight: bold;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span><br style="font-weight: bold;"> <span style="font-weight: bold;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_diasstoledimageindex[0]=i;</span><br style="font-weight: bold;"> <span style="font-weight: bold;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pixelIndex[0]=i;</span><br style="font-weight: bold;"> <span style="font-weight: bold;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pixelValue = m_OutputImage-&gt;GetPixel( pixelIndex );</span><br style="font-weight: bold;"> <span style="font-weight: bold;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 m_DiasstoledImage-&gt;SetPixel(m_diasstoledimageindex,pixelValue);</span><br style="font-weight: bold;"> <span style="font-weight: bold;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::cout&lt;&lt;pixelValue&lt;&lt;" - ";</span><br style="font-weight: bold;"> <span style="font-weight: bold;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br style="font-weight: bold;"> <span style="font-weight: bold;"> &nbsp;&nbsp;&nbsp;&nbsp; }</span><br>  <br> <span style="color: rgb(64, 64, 255); font-weight: bold;">I get the next screen:</span><br> <br> <span style="font-weight: bold;">La diasstole de l'incidence courante est l'image 0</span><br style="font-weight: bold;"> <span style="font-weight: bold;">0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 -
 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 255 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 -.........<br> <br> <span style="color: rgb(64, 64, 255);">any comment is welcome</span><br style="color: rgb(64, 64, 255);"> <span style="color: rgb(64, 64, 255);">thx</span><br style="color: rgb(64, 64, 255);"> <span style="color: rgb(64, 64, 255);">amir</span><br> </span><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.