[Insight-developers] Statistics library : Deprecation & New
Framework
Peter Cech
pcech at vision.ee.ethz.ch
Mon Oct 1 10:54:29 EDT 2007
On Sun, Sep 30, 2007 at 19:08:54 -0400, Luis Ibanez wrote:
>
> Hi Stephen,
>
> You are right, we had a sloppy approach with the image filters
> due to the intertwined nature of the pipeline with the filters.
>
> We were not strict enough on enforcing const-correctness in ITK
> at the beginning, partly due to influence of VTK, that had managed
> to live without this very useful C++ feature.
>
> The unfortunate result is that image filters do not not enforce
> const-correctness on the output at the compiler level, but still
> *expect* that nobody (except the filter itself) would modify the
> output images.
>
> Today any user is (unfortunately) allowed to have a write access
> to the output image of an image filter, just to find with surprise
> and frustration that the next run of the pipeline destroys her/his
> modifications in the image.
>
> In other words we don't enforce a concept, instead, we simply pray
> and hope that users will do the right thing, to not shoot themselves
> on the foot.
>
> I'll classify this as a bug, and propose that we fix it in the next
> major number version of ITK (that will be 4.0). Any user who may be
> now accessing and changing the output of an ITK image filter is making
> an incorrect use of the pipeline, and probably obtaining wrong results.
>
> Of course in order to live with the burden of backward compatibility we
> will have to fix this bug under the control of CMake variable that will
> allow users to build ITK with the previous lack-const-correctness bug.
It would be nice to put this information somewhere on a prominent place,
so people can easily spot it. Something like new file in the root
directory (next to README.html) or a dedicated page in documentation
(in line with current "Deprecated classes that are scheduled to be
removed from the Toolkit") that would state the what is deprecated, when
it will be removed and how to fix your code if you run into problems.
In addition to being an early warning and an upgrade guide, it would
also make it simple to copy&paste the info into release notes and also
makes a nice cleanup checklist for the next major release.
Regards,
Peter
More information about the Insight-developers
mailing list