[Insight-users] not use smart pointer

Luis Ibanez luis.ibanez at kitware.com
Wed Jan 5 15:22:09 EST 2005


Hi Pan,

Please look at the Tutorials:

   http://www.itk.org/HTML/Tutorials.htm

In particular to the Session:

         "Getting Started V"

http://www.itk.org/CourseWare/Training/GettingStarted-V.pdf

that describes how to integrate ITK into your application.

You will find multiple options on how to pass images back
and forth from functions.



   Regards,



      Luis



-----------------
Pan Ross wrote:

> Dear Sir,
>     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.
>  How should I do?
>  
>  ImageReaderType::Pointer reader = ImageReaderType::New();
>   reader->SetFileName(strdup(lpszPathName));
>   //Connect ITK -> VTK
>   ItkImageToVtkImageType::Pointer bridge = ItkImageToVtkImageType::New();
>   bridge->SetInput( reader->GetOutput() );
>   CEntity * pEnt = new CEntity();
>   pEnt->SetPointer(bridge->GetOutput());
>  
> Thanks.
> 
> 
> ------------------------------------------------------------------------
> *Do You Yahoo!?*
> 150万曲MP3疯狂搜,带您闯入音乐殿堂 <http://music.yisou.com>
> 美女明星应有尽有,搜遍美图、艳图和酷图 <http://image.yisou.com>
> 1G就是1000兆,雅虎电邮自助扩容! 
> <http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users






More information about the Insight-users mailing list