<DIV>Dear Sir,</DIV>
<DIV>&nbsp;&nbsp;&nbsp; I want to declare a pointer in one function and use it in another function. Smart Pointer cannot work. But VTK &nbsp;&nbsp;ImageReaderType * reader = new ImageReaderType();&nbsp;can work.<BR>&nbsp;How should I do?</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;ImageReaderType::Pointer reader = ImageReaderType::New();<BR>&nbsp;&nbsp;reader-&gt;SetFileName(strdup(lpszPathName));<BR>&nbsp;&nbsp;//Connect ITK -&gt; VTK<BR>&nbsp;&nbsp;ItkImageToVtkImageType::Pointer bridge = ItkImageToVtkImageType::New();<BR>&nbsp;&nbsp;bridge-&gt;SetInput( reader-&gt;GetOutput() );</DIV>
<DIV>&nbsp;&nbsp;CEntity * pEnt = new CEntity();<BR>&nbsp;&nbsp;pEnt-&gt;SetPointer(bridge-&gt;GetOutput());<BR>&nbsp;</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>