<div><span class="Apple-style-span" style>This is the only part of your code </span></div><div><span class="Apple-style-span" style>that will make the image brighter </span></div><div><span class="Apple-style-span" style>than it is. </span></div>
<div><span class="Apple-style-span" style><br></span></div><div><span class="Apple-style-span" style> else if (in.Get()&lt;50)<br>               {<br>                       out.Set(50);<br>               }</span><br><br><div>
<span class="Apple-style-span" style>I am </span><span class="Apple-style-span" style>assuming that you are expecting </span></div><div><span class="Apple-style-span" style>to see an </span><span class="Apple-style-span" style>increase here. This is not </span></div>
<div><span class="Apple-style-span" style>unexpected increase in brightness :) </span></div><div><br></div><div>Let us know, </div>Cagatay</div><div><br><div class="gmail_quote">On Tue, Jun 5, 2012 at 10:28 AM, 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>
Hi All<br>
<br>
No my viewer doesn&#39;t rescale it .<br>
<div><div class="h5"><br>
<br>
<br>
alaamegawer wrote:<br>
&gt;<br>
&gt; Hi All<br>
&gt;<br>
&gt; i wanna iterate over 3D image and during that check for some value i want<br>
&gt; to change. but unfortunately<br>
&gt; i had unexpected result my image property is<br>
&gt; size 512*512*148<br>
&gt; pixel size  2 byte<br>
&gt;<br>
&gt; my code is :<br>
&gt;<br>
&gt; const char * inputFilename  =<br>
&gt; &quot;C:/Users/Administrator/Desktop/Data/CT/ImageSet_4.mha&quot;;<br>
&gt;       ReaderType::Pointer reader= ReaderType::New();<br>
&gt;       reader-&gt;SetFileName( inputFilename);<br>
&gt;       reader-&gt;Update();<br>
&gt;<br>
&gt;       imageWriter::Pointer writer = imageWriter::New();<br>
&gt;<br>
&gt;       writer-&gt;SetFileName(&quot;C:/Users/Administrator/Desktop/Data/CT/55.mha&quot;);<br>
&gt;<br>
&gt;<br>
&gt;       InputImageType::Pointer image = reader-&gt;GetOutput();<br>
&gt;       ConstIteratorType in( image, image-&gt;GetRequestedRegion() );<br>
&gt;       IteratorType out( image, image-&gt;GetRequestedRegion() );<br>
&gt;<br>
&gt;       for ( in.GoToBegin(), out.GoToBegin(); !in.IsAtEnd(); ++in, ++out )<br>
&gt;       {<br>
&gt;               if (in.Get() &gt;1100)<br>
&gt;               {<br>
&gt;                       out.Set(100 );<br>
&gt;               }<br>
&gt;<br>
&gt;               else if (in.Get()&lt;50)<br>
&gt;               {<br>
&gt;                       out.Set(50);<br>
&gt;               }<br>
&gt;               else<br>
&gt;                               out.Set(in.Get());<br>
&gt;       }<br>
&gt;<br>
&gt;       writer-&gt;SetInput(image);<br>
&gt;       writer-&gt;Update();<br>
&gt;<br>
<br>
--<br>
</div></div>View this message in context: <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>

<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>