<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi,</div><div><br></div><div>We are using VTK and ITK in a Cocoa application without any problems.</div><div><br></div><div>Here is an example on how we include the headers, maybe it will help you...</div><div><br></div><div>Make sure the file you include itk headers in are .mm.</div><div><br></div><div>If you want to see our settings:</div><div><a href="http://www.cdash.org/CDash/buildSummary.php?buildid=205389">http://www.cdash.org/CDash/buildSummary.php?buildid=205389</a></div><div><br></div><div>Thanks.</div><div><br></div><div>Mathieu</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; color: rgb(0, 116, 0); ">// Include all the itk headers used, then this file can be used like a framework include</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; color: rgb(208, 30, 0); ">#ifdef __cplusplus</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; min-height: 16px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; color: rgb(0, 116, 0); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span>// Define undefined constant to avoid warnings.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; color: rgb(208, 30, 0); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span>#define ITK_TEMPLATE_CXX <span style="color: #000000">0</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; color: rgb(208, 30, 0); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span>#define ITK_TEMPLATE_TYPE <span style="color: #000000">0</span></div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; min-height: 16.0px"><span class="Apple-tab-span" style="white-space:pre">        </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #d01e00">#include </span>"itkImage.h"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; min-height: 16px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; color: rgb(208, 30, 0); ">#endif</div></div><br><div><div>On 29-Oct-08, at 8:47 AM, alexandre govignon wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi all<br>i tried to use vtk with cocoa. It works well. But i would like to use<br>ITK too. And it causes troubles. Definitely the problem comes from<br>templates in ITK which is not accepted by the objective-C language.<br>I include itk headers like that:<br><br><br>#define id Id<br>#import "vtkRenderer.h"<br>#import "itkImage.h"<br>#undef id<br><br>The third line cause me lots of error due to template language:<br><br>such as:<br><br>/Users/alex/Dev/ITKB/include/InsightToolkit/Common/itkNumericTraits.h:48:<br>error: expected template-name before '&lt;' token<br><br>if somebody can help me...<br><br>Regards,<br>Alexandre<br>_______________________________________________<br>Insight-users mailing list<br><a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br>http://www.itk.org/mailman/listinfo/insight-users<br><br></div></blockquote></div><br></body></html>