[Insight-users] Hello ITK with Qt Creator issue

Barbara Post bpo at eonix.be
Wed Feb 26 08:04:46 EST 2014


Hello,

I have to use Qt Creator as an IDE, and integrate ITK into the project I work on.

I use MSVC 2010 64 bit compiler. I compiled ITK with this compiler, without glitches. I installed ITK in C:\ITK.

However QMake doesn't want at all to find itkImage.h.

I'm surprised, since I checked what follows many times.

Here are the files of plain C++ project with Qt Creator, thank you for helping.

Qt Creator project file (.pro):

TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt

# ITK base directory
ITK = $(ITK)

# ITK headers base directory
ITK_INCLUDES = $${ITK}/include/ITK4-5

# ITK libs base directory
ITK_LIBS = $${ITK}/lib

# Pass information to Qmake (include path)
INCLUDEPATH += \
# $${ITK_INCLUDES}
C:/ITK/include/ITK4-5

# Pass information to Qmake (lib path)
QMAKE_LIBDIR += \
#    $${ITK_LIBS}
C:/ITK/lib

SOURCES += main.cpp

main.cpp:

#include "itkImage.h"
#include <iostream>
int main()
{
typedef itk::Image< unsigned short, 3 > ImageType;
ImageType::Pointer image = ImageType::New();
std::cout << "ITK Hello World !" << std::endl;


More information about the Insight-users mailing list