Thanks Luis. I got it to work, btw. My cmakelists.txt file looks like this:<br>----<br>PROJECT(myimg)<br><br># Find ITK.<br>FIND_PACKAGE(ITK REQUIRED)<br>IF(ITK_FOUND)<br>&nbsp; INCLUDE(${ITK_USE_FILE})<br>ENDIF(ITK_FOUND)<br><br>
FIND_PACKAGE(QT)<br>IF(QT_FOUND)<br>&nbsp;&nbsp;&nbsp; INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})<br>ENDIF(QT_FOUND)<br><br>INCLUDE(${QT_USE_FILE})<br><br>ADD_EXECUTABLE(myimg myclass.cpp myclass.h mymain.cpp)<br><br>TARGET_LINK_LIBRARIES(myimg ITKCommon ITKIO ${QT_LIBRARIES})
<br>---------<br>Please let me know if I need to add anything else here. Previously I didn&#39;t include the line<br>INCLUDE(${QT_USE_FILE})<br>and it was not working.<br><br>Thanks,<br>Ashish<br><br><div><span class="gmail_quote">
On 1/15/07, <b class="gmail_sendername">Luis Ibanez</b> &lt;<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Hi Ashish,<br><br>Please post to the list the CMakeLists.txt file that you<br>used for integrating ITK and Qt in your applications.<br><br>You may find useful to look at the example in<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InsightApplications/QtITK
<br><br><br>Regrads,<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;Luis<br><br><br>---------------------<br>Ashish Singh wrote:<br>&gt; Hi,<br>&gt;<br>&gt; I am trying to integrate my simple ITK application with Qt. I am using<br>&gt; qmake, but having problems writing the &#39;,pro&#39; file. After I provide the
<br>&gt; paths to include files and libraries and run qmake from the command<br>&gt; prompt, I get the &#39;.vcproj&#39; file. When I try to build this project from<br>&gt; inside the visual studio, it is not able to find the header file-
<br>&gt; &#39;vnl/vnl_vector.h&#39; and gives me the following error.<br>&gt;<br>&gt; c:\myinstalls\itk\insighttoolkit-3.0.0\code\io\itkImageIOBase.h(24) :<br>&gt; fatal error C1083: Cannot open include file: &#39;vnl/vnl_vector.h&#39;: No such
<br>&gt; file or directory<br>&gt;<br>&gt; I have included the path to &#39;vnl_vector.h&#39; in my qmake &#39;.pro&#39; file. I am<br>&gt; not able to figure out why is it not able to find the path. I tried Qt<br>&gt; with ITk, using Cmake, but there my visual studio project cannot find
<br>&gt; the file &#39; qapplication.h&#39;, although I have the right paths and<br>&gt; libraries in place. Can anyone please tell me where am I going wrong?<br>&gt; Or else guide me to use ITK with Qt, either using qmake or cmake.
<br>&gt;<br>&gt; Thanks,<br>&gt; Ashish<br>&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; Insight-users mailing list
<br>&gt; <a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br>&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br></blockquote></div><br>