[Insight-users] 3D image iterator problem

Cagatay Bilgin bilgincc at gmail.com
Wed Jun 6 12:45:06 EDT 2012


Hi Alaa,

it is not possible to understand what is going
on if you use a screenshot. Please save your
original image, without using a snapshot, and
your processed image, and send it to the list
along with your code so that we can try to help
you.

Cheers,
Cagatay

On Tue, Jun 5, 2012 at 3:41 PM, alaamegawer <alaamegawer at yahoo.com> wrote:

>
>
>
> this is before and after code running
>
> cagatay bilgin-2 wrote:
> >
> > Can you post the image before
> > and after processing along with
> > the code you are using ?
> >
> > Cagatay
> >
> > On Tue, Jun 5, 2012 at 1:57 PM, alaamegawer <alaamegawer at yahoo.com>
> wrote:
> >
> >>
> >> i don't know but i try to set it another value the same problem occurred
> >>
> >> i change it to
> >> if (in.Get()>1100)
> >>               {
> >>                       out.Set(0);
> >>               }
> >>
> >> the result image is brighter than first
> >>
> >>
> >> any help
> >>
> >>
> >> if
> >>
> >>
> >> cagatay bilgin-2 wrote:
> >> >
> >> > This is the only part of your code
> >> > that will make the image brighter
> >> > than it is.
> >> >
> >> >
> >> >  else if (in.Get()<50)
> >> >                {
> >> >                        out.Set(50);
> >> >                }
> >> >
> >> > I am assuming that you are expecting
> >> > to see an increase here. This is not
> >> > unexpected increase in brightness :)
> >> >
> >> > Let us know,
> >> > Cagatay
> >> >
> >> > On Tue, Jun 5, 2012 at 10:28 AM, alaamegawer <alaamegawer at yahoo.com>
> >> > wrote:
> >> >
> >> >>
> >> >> Hi All
> >> >>
> >> >> No my viewer doesn't rescale it .
> >> >>
> >> >>
> >> >>
> >> >> alaamegawer wrote:
> >> >> >
> >> >> > Hi All
> >> >> >
> >> >> > i wanna iterate over 3D image and during that check for some value
> i
> >> >> want
> >> >> > to change. but unfortunately
> >> >> > i had unexpected result my image property is
> >> >> > size 512*512*148
> >> >> > pixel size  2 byte
> >> >> >
> >> >> > my code is :
> >> >> >
> >> >> > const char * inputFilename  =
> >> >> > "C:/Users/Administrator/Desktop/Data/CT/ImageSet_4.mha";
> >> >> >       ReaderType::Pointer reader= ReaderType::New();
> >> >> >       reader->SetFileName( inputFilename);
> >> >> >       reader->Update();
> >> >> >
> >> >> >       imageWriter::Pointer writer = imageWriter::New();
> >> >> >
> >> >> >
> >> >> writer->SetFileName("C:/Users/Administrator/Desktop/Data/CT/55.mha");
> >> >> >
> >> >> >
> >> >> >       InputImageType::Pointer image = reader->GetOutput();
> >> >> >       ConstIteratorType in( image, image->GetRequestedRegion() );
> >> >> >       IteratorType out( image, image->GetRequestedRegion() );
> >> >> >
> >> >> >       for ( in.GoToBegin(), out.GoToBegin(); !in.IsAtEnd(); ++in,
> >> ++out
> >> >> )
> >> >> >       {
> >> >> >               if (in.Get() >1100)
> >> >> >               {
> >> >> >                       out.Set(100 );
> >> >> >               }
> >> >> >
> >> >> >               else if (in.Get()<50)
> >> >> >               {
> >> >> >                       out.Set(50);
> >> >> >               }
> >> >> >               else
> >> >> >                               out.Set(in.Get());
> >> >> >       }
> >> >> >
> >> >> >       writer->SetInput(image);
> >> >> >       writer->Update();
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://old.nabble.com/3D-image-iterator-problem-tp33963588p33965447.html
> >> >> Sent from the ITK - Users mailing list archive at Nabble.com.
> >> >>
> >> >> _____________________________________
> >> >> Powered by www.kitware.com
> >> >>
> >> >> Visit other Kitware open-source projects at
> >> >> http://www.kitware.com/opensource/opensource.html
> >> >>
> >> >> Kitware offers ITK Training Courses, for more information visit:
> >> >> http://www.kitware.com/products/protraining.php
> >> >>
> >> >> Please keep messages on-topic and check the ITK FAQ at:
> >> >> http://www.itk.org/Wiki/ITK_FAQ
> >> >>
> >> >> Follow this link to subscribe/unsubscribe:
> >> >> http://www.itk.org/mailman/listinfo/insight-users
> >> >>
> >> >
> >> > _____________________________________
> >> > Powered by www.kitware.com
> >> >
> >> > Visit other Kitware open-source projects at
> >> > http://www.kitware.com/opensource/opensource.html
> >> >
> >> > Kitware offers ITK Training Courses, for more information visit:
> >> > http://www.kitware.com/products/protraining.php
> >> >
> >> > Please keep messages on-topic and check the ITK FAQ at:
> >> > http://www.itk.org/Wiki/ITK_FAQ
> >> >
> >> > Follow this link to subscribe/unsubscribe:
> >> > http://www.itk.org/mailman/listinfo/insight-users
> >> >
> >> >
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/3D-image-iterator-problem-tp33963588p33966491.html
> >> Sent from the ITK - Users mailing list archive at Nabble.com.
> >>
> >> _____________________________________
> >> Powered by www.kitware.com
> >>
> >> Visit other Kitware open-source projects at
> >> http://www.kitware.com/opensource/opensource.html
> >>
> >> Kitware offers ITK Training Courses, for more information visit:
> >> http://www.kitware.com/products/protraining.php
> >>
> >> Please keep messages on-topic and check the ITK FAQ at:
> >> http://www.itk.org/Wiki/ITK_FAQ
> >>
> >> Follow this link to subscribe/unsubscribe:
> >> http://www.itk.org/mailman/listinfo/insight-users
> >>
> >
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.php
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
> >
> >
>
> http://old.nabble.com/file/p33967003/after%2528above%2529%2Band%2Bbefore%2B%2528below%2529.png
> --
> View this message in context:
> http://old.nabble.com/3D-image-iterator-problem-tp33963588p33967003.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120606/446119ec/attachment.htm>


More information about the Insight-users mailing list