[Insight-developers] ITK and Qt
Matt McCormick
matt.mccormick at kitware.com
Wed Apr 24 15:11:47 EDT 2013
Hi Gabriel,
> I am trying to develop a code in QT using ITK but I am having some problems.
> I am using CMake to add the files to the code, as I would do in Eclipse,
> with the proper changes (bellow), but I'm getting this error message:
>
> /usr/local/include/InsightToolkit/BasicFilters/itkCannyEdgeDetectionImageFilter.h:20:
> error: itkImageToImageFilter.h: No such file or directory
>
> When I open the .h file, some libraries are highlighted with the same error
> but some don't. My CMakeLists.txt is this:
>
> project(IntegracaoITK)
>
> cmake_minimum_required(VERSION 2.4.0)
>
> find_package(Qt4 REQUIRED)
>
> SET(qtproject_UIS mainwindow.ui)
>
> QT4_WRAP_UI(qtproject_UIS_H $(${{qtproject_UIS})
>
> find_package(ITK REQUIRED)
Add
include(${ITK_USE_FILE})
here.
>
> include_directories(${CMAKE_CURRENT_BINARY_DIR})
>
> add_executable(IntegracaoITK ${qtproject_SRCS} ${qtproject_UIS_H} main.cpp)
> TARGET_LINK_LIBRARIES(IntegracaoITK ITKCommon ITKIO ITKBasicFilters
> ITKAlgorithms ITKNumerics ITKSpatialObjetcs ITKReview ITKPatented
> ITKUtilities ITKgdcm ${QT_LIBRARIES})
Use ${ITK_LIBRARIES} instead of trying to list the libraries explicitly.
Hope this helps,
Matt
More information about the Insight-developers
mailing list