[Insight-users] Using ITK with XCode

Luis Ibanez luis.ibanez at kitware.com
Sat Feb 7 11:44:32 EST 2009


Hi Hector,

You are not doing anything wrong.
and the example is working just fine.

What happens is that the example is
*not* supposed to display any 3D image.

It simply prints a "Hello World" message and quits.

You should run the example from a console that allows
you to see the output of "std::cout" statements.

ITK does not provide any visualization functionalities.

If you actually wants visualization, then you could
look at the examples combining ITK and VTK. For example


   InsightApplications/Auxiliary/vtk
     itkReadITKImage3DExtractContourVTK.cxx
     itkReadITKImage3DSegmentShowVTK.cxx
     itkReadITKImageSegmentShowVTK.cxx
     itkReadITKImageShowSplineVTK.cxx
     itkReadITKImageShowVTK.cxx


   Regards,


      Luis


------------------
Bios5 wrote:
> Hello Luis!!
> 
> I'm sorry if this isn't a correct way to approach, but I have a question and
> I saw the topic of angela is like my own... I'm trying to do the helloworld
> example of ITK users guide, I'm using MAC OSX leopard and Xcode 3.1.2 I and
> also Cmake 2.6-2 for MAC, the latter now uses a GUI like the one that uses
> for MS-Windows, I think I have no problem using it, I have already compiled
> ITK as Xcode project, but now I tryed to do the helloworld example and I
> shows just the terminal window saying Hello world, but there's no 3D image
> that is suppose to be displayed, and I have no errors at building the
> project I saw angelas question saying something about to add the ITKimage.h
> file, but already did it and stills not displaying the 3D image... can you
> help me with this?? Please!!  regards. HECTOR
> 
> Luis Ibanez wrote:
> 
>>
>>Hi Angela,
>>
>>
>>Thanks for sending additional details about your problem.
>>
>>
>>The CMakeLists.txt file that you are using should work fine.
>>
>>
>>The only special thing that you need to do in order to use
>>ITK with XCode is to run CMake with the following option:
>>
>>
>>                       -GXcode
>>
>>for example:
>>
>>
>>       ccmake /Users/angela/InsightToolkit -GXcode
>>
>>
>>
>>assuming that you put the source tree of ITK in the
>>directory: /Users/angela/InsightToolkit.
>>
>>
>>With that,
>>CMake will generate a XCode project named:
>>
>>
>>              ITK.xcodeproj
>>
>>
>>that you can open directly with XCode.
>>
>>
>>
>>     Regards,
>>
>>
>>        Luis
>>
>>
>>----------------------
>>Angela Wang wrote:
>>
>>>Using Cmake v 2.4 patch3.
>>>
>>>I am just learning and starting out with this and trying to compile and 
>>>link "itkImage.h" into a  HelloWorld program.
>>>Here is the CMakeLists.txt for HelloWorld.
>>>How do I incorporate this into XCode project?  Could you give me very 
>>>explicit instructions how to do this?
>>>
>>># Find ITK.
>>>FND_PACKAGE(ITK)
>>>IF(ITK_FOUND)
>>> INCLUDE(${ITK_USE_FILE})
>>>ELSE(ITK_FOUND)
>>> MESSAGE(FATAL_ERROR
>>>         "Cannot build without ITK.  Please set ITK_DIR.")
>>>ENDIF(ITK_FOUND)
>>>
>>>ADD_EXECUTABLE(HelloWorld HelloWorld.cxx )
>>>TARGET_LINK_LIBRARIES(HelloWorld ITKCommon)
>>>
>>>Many thanks!
>>>Angela
>>>
>>>
>>>Luis Ibanez wrote:
>>>
>>>
>>>>Hi Angela,
>>>>
>>>> ITK should build fine with XCode.
>>>>
>>>>What version of CMake are you using ?
>>>>
>>>>Please post to the list the CMakeLists.txt
>>>>file of your project.
>>>>
>>>>
>>>>   Thanks
>>>>
>>>>
>>>>     Luis
>>>>
>>>>
>>>>------------------
>>>>Angela Wang wrote:
>>>>
>>>>
>>>>>I am just starting out with ITK on Mac OSX.   I would like to use 
>>>>>Xcode for development.  I am trying HelloWorld using Xcode, but can't 
>>>>>find all the headers and libraries needed.  Can someone give me some 
>>>>>guidance on what is needed or if this will work at all?
>>>>>
>>>>>Is there a better way to do this?  What are other people using for 
>>>>>ITK code development on OSX?
>>>>>
>>>>>Thanks,
>>>>>
>>>>>Angela
>>>>>
>>>>>_______________________________________________
>>>>>Insight-users mailing list
>>>>>Insight-users at itk.org
>>>>>http://www.itk.org/mailman/listinfo/insight-users
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>>_______________________________________________
>>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