Hi Alaa, <div><br></div><div>it is not possible to understand what is going </div><div>on if you use a screenshot. Please save your </div><div>original image, without using a snapshot, and </div><div>your processed image, and send it to the list </div>
<div>along with your code so that we can try to help</div><div>you. </div><div><br></div><div>Cheers, </div><div>Cagatay<br><br><div class="gmail_quote">On Tue, Jun 5, 2012 at 3:41 PM, alaamegawer <span dir="ltr"><<a href="mailto:alaamegawer@yahoo.com" target="_blank">alaamegawer@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
<br>
this is before and after code running<br>
<div><div class="h5"><br>
cagatay bilgin-2 wrote:<br>
><br>
> Can you post the image before<br>
> and after processing along with<br>
> the code you are using ?<br>
><br>
> Cagatay<br>
><br>
> On Tue, Jun 5, 2012 at 1:57 PM, alaamegawer <<a href="mailto:alaamegawer@yahoo.com">alaamegawer@yahoo.com</a>> wrote:<br>
><br>
>><br>
>> i don't know but i try to set it another value the same problem occurred<br>
>><br>
>> i change it to<br>
>> if (in.Get()>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>
>><br>
>><br>
>> cagatay bilgin-2 wrote:<br>
>> ><br>
>> > This is the only part of your code<br>
>> > that will make the image brighter<br>
>> > than it is.<br>
>> ><br>
>> ><br>
>> > else if (in.Get()<50)<br>
>> > {<br>
>> > out.Set(50);<br>
>> > }<br>
>> ><br>
>> > I am assuming that you are expecting<br>
>> > to see an increase here. This is not<br>
>> > unexpected increase in brightness :)<br>
>> ><br>
>> > Let us know,<br>
>> > Cagatay<br>
>> ><br>
>> > On Tue, Jun 5, 2012 at 10:28 AM, alaamegawer <<a href="mailto:alaamegawer@yahoo.com">alaamegawer@yahoo.com</a>><br>
>> > wrote:<br>
>> ><br>
>> >><br>
>> >> Hi All<br>
>> >><br>
>> >> No my viewer doesn't rescale it .<br>
>> >><br>
>> >><br>
>> >><br>
>> >> alaamegawer wrote:<br>
>> >> ><br>
>> >> > Hi All<br>
>> >> ><br>
>> >> > i wanna iterate over 3D image and during that check for some value i<br>
>> >> want<br>
>> >> > to change. but unfortunately<br>
>> >> > i had unexpected result my image property is<br>
>> >> > size 512*512*148<br>
>> >> > pixel size 2 byte<br>
>> >> ><br>
>> >> > my code is :<br>
>> >> ><br>
>> >> > const char * inputFilename =<br>
>> >> > "C:/Users/Administrator/Desktop/Data/CT/ImageSet_4.mha";<br>
>> >> > ReaderType::Pointer reader= ReaderType::New();<br>
>> >> > reader->SetFileName( inputFilename);<br>
>> >> > reader->Update();<br>
>> >> ><br>
>> >> > imageWriter::Pointer writer = imageWriter::New();<br>
>> >> ><br>
>> >> ><br>
>> >> writer->SetFileName("C:/Users/Administrator/Desktop/Data/CT/55.mha");<br>
>> >> ><br>
>> >> ><br>
>> >> > InputImageType::Pointer image = reader->GetOutput();<br>
>> >> > ConstIteratorType in( image, image->GetRequestedRegion() );<br>
>> >> > IteratorType out( image, image->GetRequestedRegion() );<br>
>> >> ><br>
>> >> > for ( in.GoToBegin(), out.GoToBegin(); !in.IsAtEnd(); ++in,<br>
>> ++out<br>
>> >> )<br>
>> >> > {<br>
>> >> > if (in.Get() >1100)<br>
>> >> > {<br>
>> >> > out.Set(100 );<br>
>> >> > }<br>
>> >> ><br>
>> >> > else if (in.Get()<50)<br>
>> >> > {<br>
>> >> > out.Set(50);<br>
>> >> > }<br>
>> >> > else<br>
>> >> > out.Set(in.Get());<br>
>> >> > }<br>
>> >> ><br>
>> >> > writer->SetInput(image);<br>
>> >> > writer->Update();<br>
>> >> ><br>
>> >><br>
>> >> --<br>
>> >> View this message in context:<br>
>> >><br>
>> <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>
>> >> 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>
>> >><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>
>> ><br>
>> ><br>
>> --<br>
>> View this message in context:<br>
>> <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>
>> 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>
>><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>
><br>
><br>
</div></div><a href="http://old.nabble.com/file/p33967003/after%2528above%2529%2Band%2Bbefore%2B%2528below%2529.png" target="_blank">http://old.nabble.com/file/p33967003/after%2528above%2529%2Band%2Bbefore%2B%2528below%2529.png</a><br>
<span class="HOEnZb"><font color="#888888">--<br>
View this message in context: <a href="http://old.nabble.com/3D-image-iterator-problem-tp33963588p33967003.html" target="_blank">http://old.nabble.com/3D-image-iterator-problem-tp33963588p33967003.html</a><br>
</font></span><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>