[Insight-developers] inheritance

debbie larson debbielarson_9 at hotmail.com
Fri May 25 22:24:04 EDT 2007


Hi,

This is a basic question on inheritance but I am stuck. I wrote a class that 
inherits from FloodFilledFunctionConditionalConstIterator. Thus in the .h 
file I wrote

template<class TImage, class TFunction>
class ITK_EXPORT FloodFilledFunctionConditionalConstIterator2:
    public FloodFilledFunctionConditionalConstIterator<TImage,TFunction>

Now the parent class has several typedefs that I would like to use in the 
child class. For example it has

   typedef typename TImage::IndexType  IndexType;

How do I use IndexType in the child class?

I tried

const IndexType & topIndex = m_IndexStack.front();

then I tried

const Superclass::IndexType & topIndex = m_IndexStack.front();

where
typedef FloodFilledFunctionConditionalConstIterator<TImage, TFunction> 
Superclass;

but didnt work either. Any ideas? Must be simple

Thanks

deb

_________________________________________________________________
Make every IM count. Download Messenger and join the i’m Initiative now. 
It’s free. http://im.live.com/messenger/im/home/?source=TAGHM_MAY07



More information about the Insight-developers mailing list