[Insight-developers] Fwd:

Miller, James V (CRD) millerjv at crd.ge.com
Mon Nov 13 10:19:19 EST 2000


We have been using typdefs like

typedef Image<TPixel, VDimension> Image;

all throughout the code, to specify Image, Index, Region, ... within a templated class.

What compiler problems was this causing?  The only one that I have seen is that gcc doesn't like
inheriting typedefs of this sort.  We can get around that re-typdefing.

I don't like having to duplicate the typedef from the superclass to get around this gcc problem.
However, I like the resulting syntax better than having ImageType, IndexType, RegionType, ...

If we need to make this change, let me know and I will run through all the code and propagate it.

Jim


-----Original Message-----
From: Will Schroeder [mailto:will.schroeder at kitware.com]
Sent: Monday, November 13, 2000 9:39 AM
To: Insight-Developers
Subject: [Insight-developers] Fwd:


Hi Folks-

We noticed the following code in itkFilterImageSingleOperator.h :


>    typedef Image<TPixel, VDimension> Image;

This is a bad idea, and causes compiler problems in some cases. Please
differentiate the typedef from the class:

typedef Image<TPixel, VDimension> ImageType;

BTW- The Insight/Documents/Style.ppt is kept up-to-date with
regards to how we should be coding. Please look this over at some
point is you haven't done so recently, and correct it (or notify us
of problems) if there is something that you don't agree with.

Will



_______________________________________________
Insight-developers mailing list
Insight-developers at public.kitware.com
http://public.kitware.com/mailman/listinfo/insight-developers




More information about the Insight-developers mailing list