[Insight-developers] THE CONCEPT CHECKING REVOLUTION : Please
review your filters
Gaetan Lehmann
gaetan.lehmann at jouy.inra.fr
Fri Feb 17 05:33:24 EST 2006
Hi,
I'm glad to see this revolution, especially because it would make life
easier to create the wrappers.
However, I'm not sure to understand all the checkers: for example, what is
the Convertible one ?
I think a more precise description would be nice (I have already copied
the description for the code source to the wiki, but I'm afraid it's not
enough in that case)
Is it possible to do the following check ? They seem important, because
without them, the build can succeed, but the result produced can be wrong:
- type is integer (signed/unsigned char/short/int/long/...)
- type is real (float/double/long double/...)
Gaetan
On Fri, 17 Feb 2006 02:40:42 +0100, Luis Ibanez <luis.ibanez at kitware.com>
wrote:
>
>
>
> 1. THE PROBLEM
>
> Given that ITK was designed and implemented using
> Generic Programming, most of the classes are templated
> over totally generic types. However, some classes have
> expectations about the capabilities of those types, and
> those expectations are not always made explicit in the
> code or in the documentation.
>
> For example, some image filters are intended to be used
> with images whose pixel type is float or double.
> Instantiating those filters with image of other pixel
> type will result in compilation errors, or run time
> errors.
>
>
>
>
> 2. THE SOLUTION
>
> The requirements over the types can be made explicit by adding
> the notion of Concept Checking. This is done by introducing a
> number of macros and helper templates that verify early on
> whether a type provides the capabilities that are expected by
> the filter or not.
>
>
> A set of "concepts" have been created in the file:
>
> Insight/Code/Common/
> itkConceptChecking.h
>
>
> They include features such as: requiring that a pixel
> type provides a multiplication operator, or an assignment
> operator. Other concept may be to require that the dimension
> of the input image matches the dimension of the output image.
>
>
> These concepts should be introduced on every filter in order
> to make this mechanism effective.
>
> Every filter may have many different concepts that ought
> to be introduced in the code. It is therefore not trivial
> to implement a decent coverage of concept checking. The
> support of the developers community is fundamental for
> managing successfully this monumental task.
>
>
>
>
>
> 3. THE ACTION PLAN
>
> Amy Squillacote (at Kitware) has courageously accepted the
> challenge of introducing the concepts into the ITK filters.
>
> Since there is a long list of filters, and a long list of
> concepts. This process requires the assistance of most of
> the developers. In particular, for defining what filters
> ought to have what concepts.
>
>
>
> For this purpose, Amy has created a Wiki Table with the
> list of existing concepts:
>
> http://www.itk.org/Wiki/Proposals:Concept_Checking
>
>
>
> as well as a table with the list of candidate filters:
>
> http://www.itk.org/Wiki/ConceptChecking:List_of_Filters
>
>
>
> The numbers in the columns of the second table correspond
> to the concepts listed in the first table. The purpose
> of the second table is to indicate what concept checker
> should be introduced on every filter.
>
>
> We will need the help of all the developers in order to
> fill up this table correctly.
>
>
> Please review this table and identify the filters that you
> are familiar with and help us fill in the list of concepts
> that should be checked for that filter.
>
>
> Please note that Wiki pages are not very good for managing
> simultaneous edits by multiple authors. It is therefore
> convenient to find a way of preventing multiple developers
> from updating the table simultaneously. Any suggestions
> on how to do this are welcome.
>
>
> All these changes are intended to be introduced after we
> cut the release of ITK 2.6.
>
>
> Please let us know if you have any questions or concerns.
>
>
>
> Thanks
>
>
>
> Luis
>
>
>
>
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
http://voxel.jouy.inra.fr
More information about the Insight-developers
mailing list