[Insight-developers] Deriving non-itk classes from itk classes

Luis Ibanez ibanez@cs.unc.edu
Wed, 17 Jan 2001 15:55:48 -0500


Brad King wrote:

> If we fully qualify the name, as in "::itk::ObjectFactory<x>::Create()"
> (note the leading ::), then it should work in all cases.

Good point, the (::) will be needed to prevent the declaration from
looking like  X::itk::ObjectFactory when the Macro is called inside 
any X namespace.

>  We might want to consider just writing the New() method by hand
> for the new class if it won't be part of itk (?).

Yes, this is another possibility. But it will be just the same code
that is actually contained in the NewMacro. It is not that they are 
a lot of lines, but the fact that they will be copied exactly in all 
the derived classes.

Derivation from itk classes is one of the typical ways in which the
toolkit could be used and it could be nice to verify that it can be 
done without much difficulty.



Thanks,


Luis