[Insight-users] pipeline doesn't flush

Aditya Chandramouli antariksh at gmail.com
Wed Sep 6 20:50:44 EDT 2006


Hi Karthik,

Thanks! You're right, I do use iterators to modify the image data before 
filtering. I'm not really sure about the modified time, but the workaround 
I'm using now is to modify the code so that the output of my filter is fed 
back to the input, on each iteration.

Cheers,

aditya

On Wednesday 06 September 2006 23:48, Karthik Krishnan wrote:
> Aditya Chandramouli wrote:
> >Hi,
> >
> >I have the following (pseudo-)code:
> >
> >---------------------------------
> >myFilter::New();
> >myFilter->SetInput(myImage);
> >
> >for ( n iterations )
> >{
> >	perform operations on myImage;
> >
> >	myFilter->Update();
> >}
> >---------------------------------
> >
> >My problem is that the Update only seems to take place on the first
> > iteration of the loop.
> >
> >On subsequent iterations, the update doesn't seem to take place although
> >myImage undergoes changes on each iteration and I need to re-run the
> > filter on it.
>
> Did you check the modified time of myImage to see if its MTime is
> changing ? If it is, the myFilter should update at each iteration..
>
> I suspect in the "perform operations on myImage",  you are modifying
> your image using iterators etc.. Generally, most ITK inplace filters
> will change the modified time of their images. However if you used an
> image iterator to change the values manually or if you made SetPixel
> calls etc, for reasons of efficiency, the MTime is not changed.
>
> Hope this helps.
>
> >I've tried to reinsert the myFilter->SetInput(myImage) line within the
> > loop, with no effect.
> >
> >Any help or suggestions would be most appreciated.
> >
> >thanks.
> >
> >aditya
> >_______________________________________________
> >Insight-users mailing list
> >Insight-users at itk.org
> >http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list