[Insight-users] itk vtk and cocoa

alexandre govignon govignon.alexandre at gmail.com
Wed Oct 29 11:59:36 EDT 2008


gcc 4.0.1
ITK cvs version

I have no simple test case.

Just let me know, have you used cmake for geenrating your cocoa project?

2008/10/29 Sean McBride <sean at rogue-research.com>:
> Please keep the discussion on the list.
>
> I work on a similar application and have no such problems.
>
> Which compiler?  Which version of ITK?  I have success with gcc 4.2 and
> ITK 3.8/CVS.  Do you have a simple test case showing the error, for us to try?
>
> Sean
>
>
> On 10/29/08 3:42 PM, alexandre govignon said:
>
>>The application that i build is an objective-C application (cocoa
>>document based application) when i include itk headers, the compiler
>>presents error, due to template class of itk...
>>I follow the instruction of that tutorial, who works for VTK.
>>
>>http://www.macresearch.org/cocoa_for_scientists
>>
>>tutorials number: 14,15 et 16
>>
>>
>>The only problem that i have is to include itk headers.
>>
>>2008/10/29 Sean McBride <sean at rogue-research.com>:
>>> On 10/29/08 1:47 PM, alexandre govignon said:
>>>
>>>>i tried to use vtk with cocoa. It works well. But i would like to use
>>>>ITK too. And it causes troubles. Definitely the problem comes from
>>>>templates in ITK which is not accepted by the objective-C language.
>>>>I include itk headers like that:
>>>>
>>>>
>>>>#define id Id
>>>>#import "vtkRenderer.h"
>>>>#import "itkImage.h"
>>>>#undef id
>>>>
>>>>The third line cause me lots of error due to template language:
>>>>
>>>>such as:
>>>>
>>>>/Users/alex/Dev/ITKB/include/InsightToolkit/Common/itkNumericTraits.h:48:
>>>>error: expected template-name before '<' token
>>>
>>> Unlike VTK, ITK itself does not contain any Objective-C nor Cocoa, so
>>> I'm surprised you have problems.
>>>
>>> Why are you redefining 'id' (a reserved word in Obj-C)?
>>>
>>> The public VTK and ITK headers do not use 'id' anywhere.  There is even
>>> a unit test in ITK to ensure this.
>
>
>



-- 
Cordialement,
Alexandre Govignon.


More information about the Insight-users mailing list