[Insight-developers] const inputs in Image Filters

Miller, James V (CRD) millerjv@crd.ge.com
Mon, 25 Mar 2002 17:01:36 -0500


Well, I guess the big question is: when are people going to have
const images?

I haven't had a need for them in any of the code I have written with 
ITK. So my opinion is biased away from supporting const images.



-----Original Message-----
From: Luis Ibanez [mailto:luis.ibanez@kitware.com]
Sent: Monday, March 25, 2002 4:55 PM
To: Miller, James V (CRD)
Cc: Insight Developers
Subject: Re: [Insight-developers] const inputs in Image Filters


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