[Insight-users] pipeline doesn't flush
Karthik Krishnan
Karthik.Krishnan at kitware.com
Wed Sep 6 17:48:57 EDT 2006
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