[Insight-developers] Managing Abort in Filters
Luis Ibanez
luis.ibanez@kitware.com
Sat, 12 Apr 2003 00:05:17 -0400
Bill,
That's a good idea,
I agree with you in that it is a lot of work to add
the try/catch to all the filters. It actually takes
away the simplicity + elegance of some filters...
I'll move the exception to the call of GenerateData
in ProcessObject, and double check the behavior
in the filters that need clean up.
This will be done progressively...
Luis
---------
Lorensen, William E (Research) wrote:
> Luis,
> Why not move the try/catch and the if(abort generate data) code into
> itkProcessObject.cxx. The try/catch would go around the GenerateData in
> ProcessObject.
>
> Then, be default, every filter would support abort. If a filter needed to
> modify the default behavior
>
> 1) to clean up intermediate data. Then it could try/catch, clean up its data
> and rethrow.
> 2) to produce intermediate results. It could try/catch, reset the Abort flag
> and continue.
>
> It seems like a lot of work to add the current code to all filters since
> most will use the default behavior.
>
> Bill
>