<DIV>Dear Sir,</DIV>
<DIV> I want to declare a pointer in one function and use it in another function. Smart Pointer cannot work. But VTK ImageReaderType * reader = new ImageReaderType(); can work.<BR> How should I do?</DIV>
<DIV> </DIV>
<DIV> ImageReaderType::Pointer reader = ImageReaderType::New();<BR> reader->SetFileName(strdup(lpszPathName));<BR> //Connect ITK -> VTK<BR> ItkImageToVtkImageType::Pointer bridge = ItkImageToVtkImageType::New();<BR> bridge->SetInput( reader->GetOutput() );</DIV>
<DIV> CEntity * pEnt = new CEntity();<BR> pEnt->SetPointer(bridge->GetOutput());<BR> </DIV>
<DIV>Thanks.</DIV><p><br><hr size=1><b>Do You Yahoo!?</b><br>
<a href="http://music.yisou.com" target=blank>150万曲MP3疯狂搜,带您闯入音乐殿堂</a><br><a href="http://image.yisou.com" target=blank>美女明星应有尽有,搜遍美图、艳图和酷图</a><br>
<a href="http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/" target=blank>1G就是1000兆,雅虎电邮自助扩容!</a>