[Insight-users] integration ITK,VTK and MFC ..
Luis Ibanez
luis.ibanez at kitware.com
Thu Dec 1 11:21:10 EST 2005
Hi Zien,
Yes,
you can integrate ITK in a project
without having to use CMake.
It will take you a while to get all
the settings right, but there is no
technical reason why you couldn't do
that.
You probably will regret it as soon as
you have to move your project from one
computer to another...
CMake will help you *a lot* for making
sure that your code is portable, even
over the same platform. I will strongly
encourage you to use CMake.
As a simple test, you may want to move
today your project from one computer to
another, (even with the same operating
system and same compiler). I'm sure that
will change your appreciation for CMake.
Regards,
Luis
---------------------------------------
Zien wrote:
> Thanks for your reply.
> I has an additional question,about :
> Can I integrate ITK into an existing MFC project that does not use CMake?
> It's so trouble to use CMake every time. :p
>
>
> 2005/12/1, Luis Ibanez <luis.ibanez at kitware.com>:
>
>>Hi Zien,
>>
>>
>> Yes, you are in the right path.
>>
>>
>>
>> If you already managed to create a project
>> with ITK and MFC, adding VTK should be very easy.
>>
>>
>>
>>
>>You may want to do the following:
>>
>>
>> 1) Add to your CMakeLists.txt file
>>
>> FIND_PACKAGE(VTK REQUIRED)
>> IF (VTK_FOUND)
>> INCLUDE (${VTK_USE_FILE})
>> ENDIF (VTK_FOUND)
>>
>>
>> 2) Add your VTK classes to the code in your project.
>>
>>
>> 3) You will need to look at the examples in VTK on how to
>> display a VTK window in an MFC interface.
>>
>>
>> Please look at:
>>
>> VTK/Examples/GUI/Win32/vtkMFC
>>
>>
>>
>>
>> Regards,
>>
>>
>> Luis
>>
>>
>>
>>--------------------------------------------------------
>>Zien wrote:
>>
>>>Hi,all:
>>>
>>>I want to integrate ITK,VTK and MFC into my application.
>>>First,I try to combine ITK and MFC
>>>followed by the example in the ' GettingStarted2_Using ITK with VTK.pdf '
>>>It is success to build a MFC project.
>>>But it's only ITK+MFC.......
>>>
>>>For some suggestion about my requirement:
>>>http://www.itk.org/pipermail/insight-users/2003-March/002751.html
>>>
>>>It says only add some code for VTK link into CMakeLists.txt.
>>>
>>>If I add the code about VTK link into my project's CMakeList.txt,
>>>and add VTK source code into my application.
>>>It is the way to integrate ITK,VTK and MFC.
>>>
>>>Is it right to do this ?
>>>
>>>Or how should I do about this question?
>>>_______________________________________________
>>>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