[Insight-developers] const inputs in Image Filters
Luis Ibanez
luis.ibanez@kitware.com
Mon, 25 Mar 2002 16:55:12 -0500
Jim,
Miller, James V (CRD) wrote:
>
>1) There is no GenerateInputInformation() routine.
>
Sorry, GenerateInputRequestedRegion()....
>2) Do we really want to make the GenerateInputRequestedRegion() method
>harder for people to write?
>
Well,
the intention is not to make the filters harder to write :-)
Our option is to ask users to have to do a const_cast<> whent they
want to connect a const image to a filter, between explaining the
const_cast<> to 300 users or explaining it to 30 developers we are
probably better with the second case.
>Out of the 52 filters that provide a GenerateInputRequesteRegion()or
>GenerateOutputRequestedRegion(), 12 of them are doing it incorrectly.
>
Yeap, in addition to that there is a lot of mix definion of types.
Several filters are doing things like declaring Iterators using the type of
the output image and using them to walk through the input image.
Luis