[Insight-users] itk vtk MFC

Luis Ibanez luis.ibanez at kitware.com
Fri Jan 7 10:01:36 EST 2005


Hi Pan,

In the Tutorial session

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

page 12, the import filter will be destroyed, but its output
image will NOT be destroyed.

Please note the boolean flag that we are passing to the import filter:

     importFilterWillDeleteTheInputBuffer = false;

This boolean flag is the third argument of the method
SetImportPointer().

If you want to further make sure that the Output image is not
going to be destroyed along with the filter, then you may add
the following calls:


    ImageType::Pointer outputImage = importer->GetOutput();
    outputImage->DisconnectPipeline();
    return outputImage;


Please let us know if you encounter any problem,



    Thanks



        Luis



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

> In itk-gettingstarted-V.pdf, Is the example Data Transfer Import Filter
> right? I think "return importer->GetOutput();" does not work because 
> importer will be destroyed. 
> */Luis Ibanez <luis.ibanez at kitware.com>/* wrote:
> 
> 
>     Hi Pan,
> 
> 
>     1) For instructions on how to combine ITK and VTK,
>     please look at the Tutorial sessions.
> 
>     http://www.itk.org/HTML/Tutorials.htm
> 
>     in particular to
> 
>     http://www.itk.org/CourseWare/Training/GettingStarted-II.pdf
> 
>     You will find further coding examples in
> 
>     InsightApplications/Auxiliary/vtk/
> 
>     itkCurvatureFlowToVTK.cxx
>     itkImageToVTKImageFilter.h
>     itkImageToVTKImageFilter.txx
>     itkPNGVTKtoITKtoVTK.cxx
>     itkReadITKImage3DSegmentShowVTK.cxx
>     itkReadITKImageSegmentShowVTK.cxx
>     itkReadITKImageShowVTK.cxx
>     itkVTKImageToImageFilter.h
>     itkVTKImageToImageFilter.txx
>     itkVTKtoITKtoVTK.cxx
> 
> 
> 
>     2) For examples on how to combine ITK and MFC please look
>     at the code in
> 
> 
>     InsightApplications/
>     ItkMFC
> 
> 
>     3) For examples on how to combine VTK and MFC, please look
>     at the code in
> 
> 
>     VTK/Examples/GUI/Win32/vtkMFC/
> 
> 
> 
>     Regards,
> 
> 
>     Luis
> 
> 
> 
>     --------------
>     Pan Ross wrote:
> 
>      > I want to write an application with itk+vtk+mfc. Using itk to
>     read an
>      > image, convert to vtk image data and display. In several
>     functions, I
>      > convert vtk image data to itk image data, call itk filter to
>     process the
>      > image data, then convert back to vtk image data and display. I
>     always
>      > keep the last result data. How can implement this work?
>      >
>      > Thanks.
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      > *Do You Yahoo!?*
>      > 150万曲MP3疯狂搜,带您闯入音乐殿堂
>      > 美女明星应有尽有,搜遍美图、艳图和酷图
>      > 1G就是1000兆,雅虎电邮自助扩容!
>      >
>      >
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > _______________________________________________
>      > Insight-users mailing list
>      > Insight-users at itk.org
>      > http://www.itk.org/mailman/listinfo/insight-users
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> *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/> 
> 






More information about the Insight-users mailing list