[Insight-users] How to use smart pointers in derived class ??

Sachin Jambawalikar sachinjam@gmail.com
Wed May 19 20:45:02 EDT 2004


Hi all ,

Can anybody tell me how  to use smart pointers for a derived class.


I've derived a class from the  itkcolortable class.

I can instantiate an  object of the class by

CadColorType* colortb=new CadColorTable();
colortb->useCad(); //function inderived class



I would like to use instead 
CadColorTableType::Pointer colortb=ColorTableType::New();
colortb->useCad();
 
What do I need to do for constructor to use New()??

Regards
--Sachin



More information about the Insight-users mailing list