Can you post the image before <br>and after processing along with <div>the code you are using ?</div><div><br></div><div>Cagatay <div><div><div><br><div class="gmail_quote">On Tue, Jun 5, 2012 at 1:57 PM, alaamegawer <span dir="ltr">&lt;<a href="mailto:alaamegawer@yahoo.com" target="_blank">alaamegawer@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
i don&#39;t know but i try to set it another value the same problem occurred<br>
<br>
i change it to<br>
if (in.Get()&gt;1100)<br>
               {<br>
                       out.Set(0);<br>
               }<br>
<br>
the result image is brighter than first<br>
<br>
<br>
any help<br>
<br>
<br>
if<br>
<div><div class="h5"><br>
<br>
cagatay bilgin-2 wrote:<br>
&gt;<br>
&gt; This is the only part of your code<br>
&gt; that will make the image brighter<br>
&gt; than it is.<br>
&gt;<br>
&gt;<br>
&gt;  else if (in.Get()&lt;50)<br>
&gt;                {<br>
&gt;                        out.Set(50);<br>
&gt;                }<br>
&gt;<br>
&gt; I am assuming that you are expecting<br>
&gt; to see an increase here. This is not<br>
&gt; unexpected increase in brightness :)<br>
&gt;<br>
&gt; Let us know,<br>
&gt; Cagatay<br>
&gt;<br>
&gt; On Tue, Jun 5, 2012 at 10:28 AM, alaamegawer &lt;<a href="mailto:alaamegawer@yahoo.com">alaamegawer@yahoo.com</a>&gt;<br>
&gt; wrote:<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hi All<br>
&gt;&gt;<br>
&gt;&gt; No my viewer doesn&#39;t rescale it .<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; alaamegawer wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Hi All<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; i wanna iterate over 3D image and during that check for some value i<br>
&gt;&gt; want<br>
&gt;&gt; &gt; to change. but unfortunately<br>
&gt;&gt; &gt; i had unexpected result my image property is<br>
&gt;&gt; &gt; size 512*512*148<br>
&gt;&gt; &gt; pixel size  2 byte<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; my code is :<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; const char * inputFilename  =<br>
&gt;&gt; &gt; &quot;C:/Users/Administrator/Desktop/Data/CT/ImageSet_4.mha&quot;;<br>
&gt;&gt; &gt;       ReaderType::Pointer reader= ReaderType::New();<br>
&gt;&gt; &gt;       reader-&gt;SetFileName( inputFilename);<br>
&gt;&gt; &gt;       reader-&gt;Update();<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;       imageWriter::Pointer writer = imageWriter::New();<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; writer-&gt;SetFileName(&quot;C:/Users/Administrator/Desktop/Data/CT/55.mha&quot;);<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;       InputImageType::Pointer image = reader-&gt;GetOutput();<br>
&gt;&gt; &gt;       ConstIteratorType in( image, image-&gt;GetRequestedRegion() );<br>
&gt;&gt; &gt;       IteratorType out( image, image-&gt;GetRequestedRegion() );<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;       for ( in.GoToBegin(), out.GoToBegin(); !in.IsAtEnd(); ++in, ++out<br>
&gt;&gt; )<br>
&gt;&gt; &gt;       {<br>
&gt;&gt; &gt;               if (in.Get() &gt;1100)<br>
&gt;&gt; &gt;               {<br>
&gt;&gt; &gt;                       out.Set(100 );<br>
&gt;&gt; &gt;               }<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;               else if (in.Get()&lt;50)<br>
&gt;&gt; &gt;               {<br>
&gt;&gt; &gt;                       out.Set(50);<br>
&gt;&gt; &gt;               }<br>
&gt;&gt; &gt;               else<br>
&gt;&gt; &gt;                               out.Set(in.Get());<br>
&gt;&gt; &gt;       }<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;       writer-&gt;SetInput(image);<br>
&gt;&gt; &gt;       writer-&gt;Update();<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; View this message in context:<br>
&gt;&gt; <a href="http://old.nabble.com/3D-image-iterator-problem-tp33963588p33965447.html" target="_blank">http://old.nabble.com/3D-image-iterator-problem-tp33963588p33965447.html</a><br>
&gt;&gt; Sent from the ITK - Users mailing list archive at Nabble.com.<br>
&gt;&gt;<br>
&gt;&gt; _____________________________________<br>
&gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt;<br>
&gt;&gt; Visit other Kitware open-source projects at<br>
&gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;<br>
&gt;&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt;&gt; <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
&gt;&gt;<br>
&gt;&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt;&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;&gt;<br>
&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;&gt;<br>
&gt;<br>
&gt; _____________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt; <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;<br>
&gt;<br>
--<br>
</div></div>View this message in context: <a href="http://old.nabble.com/3D-image-iterator-problem-tp33963588p33966491.html" target="_blank">http://old.nabble.com/3D-image-iterator-problem-tp33963588p33966491.html</a><br>

<div class="HOEnZb"><div class="h5">Sent from the ITK - Users mailing list archive at Nabble.com.<br>
<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</div></div></blockquote></div><br></div></div></div></div>