ITK and VTK headers not found by QT in Windows 8
-
The problem is I couldn't find a clear way to integrate the ITK and VTK into QT in Windows, as Qt asks for included headers which I could find no where in Windows after building ITK and VTK for QT. When I copied the headers from Mac and set the path to the headers. The QT again produces an error
@
cannot find included file "pthread.h"
@which I guess is valid for only Linux...
-
Qt does not produce the error: that is your C++ compiler.
Header files are not "generated" they are part of the source code you used to build ITK and/or VTK on Windows. There are plenty of them visible in the "git":http://itk.org/gitweb?p=ITK.git;a=tree;f=Modules/Core/Common/include;h=1ce1109066957a199153c01d411bbdd6d64cea49;hb=HEAD "repository":http://itk.org/gitweb?p=ITK.git;a=tree;f=Modules/Bridge/VTK/include;h=29a036dec94ae9bc3a71fcdc2c8f71b3822d039f;hb=HEAD. Where the the ITK CMake setup installs them during the build would appear to be* in the include folder of the build directory.
- I am not going to tool up and build this just to find out for you.
-
Hi...
Thanks for the message but i could find it only in the source directory in the build directory all the headers are not available. Is there any way to link the headers with Qt?.. I read in forums its just enough if we set the path to the installed ITK and VTK directory. But this is not working out for me. -
You fix your problems by fixing the INCLUDEPATH variable and then using a suitable relative path in your #include directives.
-
Hi I have tried what you said. I have attached a detailed expression of my problem again
Hi,
I am creating a project for Image Registration. I had to use windows 8 for executing it. I checked my code with Mac OSX it works perfectly but i have a problem in finding the headers i have used (ITK AND VTK) in Windows it was clearly available in usr/local/include in Mac. But after building the Qt and VTK AND ITK all in VS 2012 Professional 64 bit. I still couldnt find a way to include the headers in Qt ProMy pro file looks like this
@ **#------------------------------------------------- # # Project created by QtCreator 2013-09-18T14:03:47 # #------------------------------------------------- QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = ImageRegistration TEMPLATE = app LIBS += -L/C:/Toolkits/itk-4.4.2/bin/lib/Release/\ -lITKVtkGlue-4.4\ -lITKBiasCorrection-4.4\ -lITKBioCell-4.4\ -lITKCommon-4.4\ -lITKDICOMParser-4.4\ -litkdouble-conversion-4.4\ -lITKEXPAT-4.4\ -lITKFEM-4.4\ -litkgdcmCommon-4.4\ -litkgdcmDICT-4.4\ -litkgdcmDSED-4.4\ -litkgdcmIOD-4.4\ -litkgdcmjpeg8-4.4\ -litkgdcmjpeg12-4.4\ -litkgdcmjpeg16-4.4\ -litkgdcmMSFF-4.4\ -litkgdcmuuid-4.4\ -lITKgiftiio-4.4\ -litkhdf5_cpp-4.4\ -litkhdf5-4.4\ -lITKIOBioRad-4.4\ -lITKIOBMP-4.4\ -lITKIOCSV-4.4\ -lITKIOGDCM-4.4\ -lITKIOGE-4.4\ -lITKIOGIPL-4.4\ -lITKIOHDF5-4.4\ -lITKIOImageBase-4.4\ -lITKIOIPL-4.4\ -lITKIOJPEG-4.4\ -lITKIOLSM-4.4\ -lITKIOMesh-4.4\ -lITKIOMeta-4.4\ -lITKIONIFTI-4.4\ -lITKIONRRD-4.4\ -lITKIOPNG-4.4\ -lITKIOSiemens-4.4\ -lITKIOSpatialObjects-4.4\ -lITKIOStimulate-4.4\ -lITKIOTIFF-4.4\ -lITKIOTransformBase-4.4\ -lITKIOTransformHDF5-4.4\ -lITKIOTransformInsightLegacy-4.4\ -lITKIOTransformMatlab-4.4\ -lITKIOVTK-4.4\ -lITKIOXML-4.4\ -litkjpeg-4.4\ -lITKKLMRegionGrowing-4.4\ -lITKLabelMap-4.4\ -lITKMesh-4.4\ -lITKMetaIO-4.4\ -litkNetlibSlatec-4.4\ -lITKniftiio-4.4\ -lITKNrrdIO-4.4\ -litkopenjpeg-4.4\ -lITKOptimizers-4.4\ -lITKOptimizersv4-4.4\ -lITKPath-4.4\ -litkpng-4.4\ -lITKPolynomials-4.4\ -lITKQuadEdgeMesh-4.4\ -lITKReview-4.4\ -lITKSpatialObjects-4.4\ -lITKStatistics-4.4\ -litksys-4.4\ -litktiff-4.4\ -litkv3p_lsqr-4.4\ -litkv3p_netlib-4.4\ -litkvcl-4.4\ -lITKVideoCore-4.4\ -lITKVideoIO-4.4\ -litkvnl_algo-4.4\ -litkvnl-4.4\ -lITKVNLInstantiation-4.4\ -lITKVTK-4.4\ -lITKWatersheds-4.4\ -litkzlib-4.4\ -lITKznz-4.4 INCLUDEPATH+= C:/Toolkits/itk-4.4.2 DEPENDPATH+= C:/Toolkits/itk-4.4.2 LIBS += -L/C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/macos/ \ -lboost_filesystem\ -lboost_system\ -lhdf5\ -lhdf5_cpp\ -lscilscore\ -lscilsdomainmodel\ -lscilsgenericio\ -lscilshdf5io\ -llibz INCLUDEPATH+=C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/boost DEPENDPATH+=C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/boost INCLUDEPATH+=C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/scils DEPENDPATH+=C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/scils INCLUDEPATH+=C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/hdf5 DEPENDPATH+=C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/hdf5 INCLUDEPATH+=C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/hdf5-static DEPENDPATH+=C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/hdf5-static LIBS += -L/C:/Toolkits/vtk-5.10/bin/bin/Release/\ -lQVTK\ -lvtkalglib\ -lvtkCharts\ -lvtkCommon\ -lvtkDICOMParser\ -lvtkexoIIc\ -lvtkexpat\ -lvtkFiltering\ -lvtkfreetype\ -lvtkftgl\ -lvtkGenericFiltering\ -lvtkGeovis\ -lvtkGraphics\ -lvtkhdf5_hl\ -lvtkhdf5\ -lvtkHybrid\ -lvtkImaging\ -lvtkInfovis\ -lvtkIO\ -lvtkjpeg\ -lvtklibxml2\ -lvtkmetaio\ -lvtkNetCDF_cxx\ -lvtkNetCDF\ -lvtkpng\ -lvtkproj4\ -lvtkRendering\ -lvtksqlite\ -lvtksys\ -lvtktiff\ -lvtkverdict\ -lvtkViews\ -lvtkVolumeRendering\ -lvtkWidgets\ -lvtkzlib INCLUDEPATH+= C:/Toolkits/vtk-5.10 DEPENDPATH+= C:/Toolkits/vtk-5.10 INCLUDEPATH+=$$PWD SOURCES += main.cpp\ ImageRegistrationImplementation.cpp\ listWidget.cpp\ overlayview.cpp \ transforms.cpp \ model.cpp \ imageviewer.cpp HEADERS += ImageRegistrationImplementation.h\ listWidget.h\ overlayview.h \ transforms.h \ model.h \ imageviewer.h FORMS += ImageRegistration.ui ** @
I have included the installation directory of the ITK and VTK. I couldnt include the path where the headers are as i couldnt find everyone of them. I even tried copying the headers from my Mac to the the installed itk and vtk directory without any success. It would be great if anyone exactly tell me how to link the headers in Qt Creator.
-
Hi,
You built ITK and VTK with visual: there should be a project named INSTALL in your solution. Did you generate it (it is not always generated when you generate the whole solution)? What is the content of the following directories:
-C:/Toolkits/itk-4.4.2
-C:/Toolkits/vtk-5.10 -
Hi i generated using all build in some forums everyone suggested to do so. But the problem is finding the location of the headers are really causing problem.As i wrote my code in Mac. I have to use it for executing in windows.
ITK
@
"C:\Toolkits\itk-4.4.2\bin\bin"
"C:\Toolkits\itk-4.4.2\bin\CMakeFiles"
"C:\Toolkits\itk-4.4.2\bin\CMakeTmp"
"C:\Toolkits\itk-4.4.2\bin\config"
"C:\Toolkits\itk-4.4.2\bin\Debug"
"C:\Toolkits\itk-4.4.2\bin\Examples"
"C:\Toolkits\itk-4.4.2\bin\ExternalData"
"C:\Toolkits\itk-4.4.2\bin\lib"
"C:\Toolkits\itk-4.4.2\bin\Modules"
"C:\Toolkits\itk-4.4.2\bin\Testing"
"C:\Toolkits\itk-4.4.2\bin\Utilities"
"C:\Toolkits\itk-4.4.2\bin\x64"
"C:\Toolkits\itk-4.4.2\bin\ALL_BUILD.vcxproj"
"C:\Toolkits\itk-4.4.2\bin\ALL_BUILD.vcxproj.filters"
"C:\Toolkits\itk-4.4.2\bin\cmake_install.cmake"
"C:\Toolkits\itk-4.4.2\bin\CMakeCache.txt"
"C:\Toolkits\itk-4.4.2\bin\CPackConfig.cmake"
"C:\Toolkits\itk-4.4.2\bin\CPackSourceConfig.cmake"
"C:\Toolkits\itk-4.4.2\bin\CTestCustom.cmake"
"C:\Toolkits\itk-4.4.2\bin\DartConfiguration.tcl"
"C:\Toolkits\itk-4.4.2\bin\INSTALL.vcxproj"
"C:\Toolkits\itk-4.4.2\bin\INSTALL.vcxproj.filters"
"C:\Toolkits\itk-4.4.2\bin\ITK.sdf"
"C:\Toolkits\itk-4.4.2\bin\ITK.sln"
"C:\Toolkits\itk-4.4.2\bin\ITKConfig.cmake"
"C:\Toolkits\itk-4.4.2\bin\ITKConfigVersion.cmake"
"C:\Toolkits\itk-4.4.2\bin\ITKData.vcxproj"
"C:\Toolkits\itk-4.4.2\bin\ITKData.vcxproj.filters"
"C:\Toolkits\itk-4.4.2\bin\ITKData_config.cmake"
"C:\Toolkits\itk-4.4.2\bin\ITKHeaderTests.vcxproj"
"C:\Toolkits\itk-4.4.2\bin\ITKHeaderTests.vcxproj.filters"
"C:\Toolkits\itk-4.4.2\bin\ITKTargets.cmake"
"C:\Toolkits\itk-4.4.2\bin\PACKAGE.vcxproj"
"C:\Toolkits\itk-4.4.2\bin\PACKAGE.vcxproj.filters"
"C:\Toolkits\itk-4.4.2\bin\single-doxygen.config"
"C:\Toolkits\itk-4.4.2\bin\ZERO_CHECK.vcxproj"
"C:\Toolkits\itk-4.4.2\bin\ZERO_CHECK.vcxproj.filters"
@in src
@
"C:\Toolkits\itk-4.4.2\src.ExternalData"
"C:\Toolkits\itk-4.4.2\src\CMake"
"C:\Toolkits\itk-4.4.2\src\Documentation"
"C:\Toolkits\itk-4.4.2\src\Examples"
"C:\Toolkits\itk-4.4.2\src\Modules"
"C:\Toolkits\itk-4.4.2\src\Testing"
"C:\Toolkits\itk-4.4.2\src\Utilities"
"C:\Toolkits\itk-4.4.2\src\Wrapping"
"C:\Toolkits\itk-4.4.2\src\CMakeLists.txt"
"C:\Toolkits\itk-4.4.2\src\CTestConfig.cmake"
"C:\Toolkits\itk-4.4.2\src\GettingStarted.txt"
"C:\Toolkits\itk-4.4.2\src\LICENSE"
"C:\Toolkits\itk-4.4.2\src\NOTICE"
"C:\Toolkits\itk-4.4.2\src\README.txt"@
-
In VTK
SRC
@
"C:\Toolkits\vtk-5.10\src\Charts"
"C:\Toolkits\vtk-5.10\src\Chemistry"
"C:\Toolkits\vtk-5.10\src\CMake"
"C:\Toolkits\vtk-5.10\src\Common"
"C:\Toolkits\vtk-5.10\src\Examples"
"C:\Toolkits\vtk-5.10\src\Filtering"
"C:\Toolkits\vtk-5.10\src\GenericFiltering"
"C:\Toolkits\vtk-5.10\src\Geovis"
"C:\Toolkits\vtk-5.10\src\Graphics"
"C:\Toolkits\vtk-5.10\src\GUISupport"
"C:\Toolkits\vtk-5.10\src\Hybrid"
"C:\Toolkits\vtk-5.10\src\Imaging"
"C:\Toolkits\vtk-5.10\src\Infovis"
"C:\Toolkits\vtk-5.10\src\IO"
"C:\Toolkits\vtk-5.10\src\Parallel"
"C:\Toolkits\vtk-5.10\src\Rendering"
"C:\Toolkits\vtk-5.10\src\TextAnalysis"
"C:\Toolkits\vtk-5.10\src\Utilities"
"C:\Toolkits\vtk-5.10\src\Views"
"C:\Toolkits\vtk-5.10\src\VolumeRendering"
"C:\Toolkits\vtk-5.10\src\Widgets"
"C:\Toolkits\vtk-5.10\src\Wrapping"
"C:\Toolkits\vtk-5.10\src\CMakeLists.txt"
"C:\Toolkits\vtk-5.10\src\Copyright.txt"
"C:\Toolkits\vtk-5.10\src\CTestConfig.cmake"
"C:\Toolkits\vtk-5.10\src\README.html"
"C:\Toolkits\vtk-5.10\src\Testing.txt"
"C:\Toolkits\vtk-5.10\src\UseVTK.cmake.in"
"C:\Toolkits\vtk-5.10\src\vtkBanner.gif"
"C:\Toolkits\vtk-5.10\src\VTKConfig.cmake.in"
"C:\Toolkits\vtk-5.10\src\vtkConfigure.h.in"
"C:\Toolkits\vtk-5.10\src\VTKConfigVersion.cmake.in"
"C:\Toolkits\vtk-5.10\src\VTKCPack.cmake"
"C:\Toolkits\vtk-5.10\src\vtkGenerateVTKConfig.cmake"
"C:\Toolkits\vtk-5.10\src\vtkIncludeDirectories.cmake"
"C:\Toolkits\vtk-5.10\src\vtkLogo.ico"
"C:\Toolkits\vtk-5.10\src\vtkLogo.jpg"
"C:\Toolkits\vtk-5.10\src\vtkMacros.cmake"
"C:\Toolkits\vtk-5.10\src\vtkToolkits.h.in"@
BIN@
"C:\Toolkits\vtk-5.10\bin\bin"
"C:\Toolkits\vtk-5.10\bin\Charts"
"C:\Toolkits\vtk-5.10\bin\CMake"
"C:\Toolkits\vtk-5.10\bin\CMakeFiles"
"C:\Toolkits\vtk-5.10\bin\CMakeTmp"
"C:\Toolkits\vtk-5.10\bin\Common"
"C:\Toolkits\vtk-5.10\bin\Debug"
"C:\Toolkits\vtk-5.10\bin\Filtering"
"C:\Toolkits\vtk-5.10\bin\GenericFiltering"
"C:\Toolkits\vtk-5.10\bin\Geovis"
"C:\Toolkits\vtk-5.10\bin\Graphics"
"C:\Toolkits\vtk-5.10\bin\GUISupport"
"C:\Toolkits\vtk-5.10\bin\Hybrid"
"C:\Toolkits\vtk-5.10\bin\Imaging"
"C:\Toolkits\vtk-5.10\bin\Infovis"
"C:\Toolkits\vtk-5.10\bin\IO"
"C:\Toolkits\vtk-5.10\bin\Release"
"C:\Toolkits\vtk-5.10\bin\Rendering"
"C:\Toolkits\vtk-5.10\bin\Testing"
"C:\Toolkits\vtk-5.10\bin\Utilities"
"C:\Toolkits\vtk-5.10\bin\Views"
"C:\Toolkits\vtk-5.10\bin\VolumeRendering"
"C:\Toolkits\vtk-5.10\bin\vtkstd"
"C:\Toolkits\vtk-5.10\bin\Widgets"
"C:\Toolkits\vtk-5.10\bin\Win32"
"C:\Toolkits\vtk-5.10\bin\Wrapping"
"C:\Toolkits\vtk-5.10\bin\ALL_BUILD.vcxproj"
"C:\Toolkits\vtk-5.10\bin\ALL_BUILD.vcxproj.filters"
"C:\Toolkits\vtk-5.10\bin\cmake_install.cmake"
"C:\Toolkits\vtk-5.10\bin\CMakeCache.txt"
"C:\Toolkits\vtk-5.10\bin\CTestCustom.cmake"
"C:\Toolkits\vtk-5.10\bin\DartConfiguration.tcl"
"C:\Toolkits\vtk-5.10\bin\INSTALL.vcxproj"
"C:\Toolkits\vtk-5.10\bin\INSTALL.vcxproj.filters"
"C:\Toolkits\vtk-5.10\bin\proj_config.h"
"C:\Toolkits\vtk-5.10\bin\UseVTK.cmake"
"C:\Toolkits\vtk-5.10\bin\VTK.sdf"
"C:\Toolkits\vtk-5.10\bin\VTK.sln"
"C:\Toolkits\vtk-5.10\bin\VTKBuildSettings.cmake"
"C:\Toolkits\vtk-5.10\bin\vtkChartsInstantiator.h"
"C:\Toolkits\vtk-5.10\bin\vtkCommonInstantiator.h"
"C:\Toolkits\vtk-5.10\bin\VTKCompileToolsConfig.cmake"
"C:\Toolkits\vtk-5.10\bin\VTKConfig.cmake"
"C:\Toolkits\vtk-5.10\bin\VTKConfigQt.cmake"
"C:\Toolkits\vtk-5.10\bin\vtkConfigure.h"
"C:\Toolkits\vtk-5.10\bin\VTKConfigVersion.cmake"
"C:\Toolkits\vtk-5.10\bin\vtkFilteringInstantiator.h"
"C:\Toolkits\vtk-5.10\bin\vtkGenericFilteringInstantiator.h"
"C:\Toolkits\vtk-5.10\bin\vtkGeovisInstantiator.h"
"C:\Toolkits\vtk-5.10\bin\vtkGraphicsInstantiator.h"
"C:\Toolkits\vtk-5.10\bin\vtkHybridInstantiator.h"
"C:\Toolkits\vtk-5.10\bin\vtkImagingInstantiator.h"
"C:\Toolkits\vtk-5.10\bin\vtkInfovisInstantiator.h"
"C:\Toolkits\vtk-5.10\bin\vtkIOInstantiator.h"
"C:\Toolkits\vtk-5.10\bin\vtkRenderingInstantiator.h"
"C:\Toolkits\vtk-5.10\bin\VTKTargets.cmake"
"C:\Toolkits\vtk-5.10\bin\vtkToolkits.h"
"C:\Toolkits\vtk-5.10\bin\vtkViewsInstantiator.h"
"C:\Toolkits\vtk-5.10\bin\vtkVolumeRenderingInstantiator.h"
"C:\Toolkits\vtk-5.10\bin\vtkWidgetsInstantiator.h"
"C:\Toolkits\vtk-5.10\bin\ZERO_CHECK.vcxproj"
"C:\Toolkits\vtk-5.10\bin\ZERO_CHECK.vcxproj.filters"@
-
Ok, your directory "C:\Toolkits\itk-4.4.2\bin" looks like a shadow build directory. When using cmake to generate the visual studio solution, what directory did you specify for the installation?
-
This is the same directory i specified.During my build. Is there any problem about my bin directory??...
-
Open the cmake wizard. Fill the line "Where is your source code" with ""C:\Toolkits\itk-4.4.2\src". Fill the line "Where to build the binaries" with "C:\Toolkits\itk-4.4.2\bin". Check the "Advanced" option in the next line at the right. In the cmake variables, you should have "CMAKE_INSTALL_PREFIX": what is the value?