Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, January 2007
using ITk with Qt- cannot find 'vnl/vnl_vector.h'


Message 1 in thread

Hi,

I am trying to integrate my simple ITK application with Qt. I am using
qmake, but having problems writing the ',pro' file. After I provide the
paths to include files and libraries and run qmake from the command prompt,
I get the '.vcproj' file. When I try to build this project from inside the
visual studio, it is not able to find the header file- 'vnl/vnl_vector.h'
and gives me the following error.

c:\myinstalls\itk\insighttoolkit-3.0.0\code\io\itkImageIOBase.h(24) : fatal
error C1083: Cannot open include file: 'vnl/vnl_vector.h': No such file or
directory

I have included the path to 'vnl_vector.h' in my qmake '.pro' file. I am not
able to figure out why is it not able to find the path. I tried Qt with ITk,
using Cmake, but there my visual studio project cannot find the file '
qapplication.h', although I have the right paths and libraries in place. Can
anyone please tell me where am I going wrong?
Or else guide me to use ITK with Qt, either using qmake or cmake.

Thanks,
Ashish

Message 2 in thread

Ashish Singh wrote:
> Hi,
> 
> I am trying to integrate my simple ITK application with Qt. I am using
> qmake, but having problems writing the ',pro' file. After I provide the
> paths to include files and libraries and run qmake from the command
> prompt, I get the '.vcproj' file. When I try to build this project from
> inside the visual studio, it is not able to find the header file-
> 'vnl/vnl_vector.h' and gives me the following error.
> 
> c:\myinstalls\itk\insighttoolkit-3.0.0\code\io\itkImageIOBase.h(24) :
> fatal error C1083: Cannot open include file: 'vnl/vnl_vector.h': No such
> file or directory
> 
> I have included the path to 'vnl_vector.h' in my qmake '.pro' file. I am
> not able to figure out why is it not able to find the path. I tried Qt
> with ITk, using Cmake, but there my visual studio project cannot find
> the file ' qapplication.h', although I have the right paths and
> libraries in place. Can anyone please tell me where am I going wrong?
> Or else guide me to use ITK with Qt, either using qmake or cmake.
> 
> Thanks,
> Ashish
> 

I had to add the following to my .pro file to get my Qt4 program to work with
ITK 2.8.1:

LIBS    +=      -L$$(ITK_DIR)/bin \
                -lITKNumerics \
                -lITKIO \
                -lITKNrrdIO \
                -litkgdcm \
                -litkjpeg12 \
                -litkjpeg16 \
                -litkopenjpeg \
                -litkpng \
                -litktiff \
                -litkjpeg8 \
                -lITKSpatialObject \
                -lITKNumerics \
                -lITKCommon \
                -litkvnl_inst \
                -litkvnl_algo \
                -litkvnl \
                -litknetlib \
                -litkvcl \
                -lm \
                -litksys \
                -lITKMetaIO \
                -lITKDICOMParser \
                -lITKEXPAT \
                -lITKniftiio \
                -lITKznz \
                -litkzlib \
                -lm


INCLUDEPATH +=  $$(ITK_DIR)/Utilities/vxl/core \
                $$(ITK_DIR)/Utilities/vxl/vcl \
                $$(ITK_SOURCE_DIR)/Utilities/vxl/core \
                $$(ITK_SOURCE_DIR)/Utilities/vxl/vcl \
                $$(ITK_SOURCE_DIR)/Utilities \
                $$(ITK_DIR)/Utilities \
                $$(ITK_DIR)/Utilities/gdcm \
                $$(ITK_SOURCE_DIR)/Utilities/nifti/znzlib \
                $$(ITK_SOURCE_DIR)/Utilities/nifti/niftilib \
                $$(ITK_SOURCE_DIR)/Utilities/expat \
                $$(ITK_DIR)/Utilities/expat \
                $$(ITK_DIR)/Utilities/DICOMParser \
                $$(ITK_SOURCE_DIR)/Utilities/DICOMParser \
                $$(ITK_SOURCE_DIR)/Utilities/NrrdIO \
                $$(ITK_SOURCE_DIR)/Utilities/MetaIO \
                $$(ITK_SOURCE_DIR)/Code/SpatialObject \
                $$(ITK_SOURCE_DIR)/Code/Numerics/NeuralNetworks \
                $$(ITK_SOURCE_DIR)/Code/Numerics/Statistics \
                $$(ITK_SOURCE_DIR)/Code/Numerics/FEM \
                $$(ITK_SOURCE_DIR)/Code/IO \
                $$(ITK_SOURCE_DIR)/Code/Numerics \
                $$(ITK_SOURCE_DIR)/Code/Common \
                $$(ITK_SOURCE_DIR)/Code/BasicFilters \
                $$(ITK_SOURCE_DIR)/Code/Algorithms \
                $$(ITK_DIR)

Here ITK_DIR points to the ITK build directory (ITK_BINARY_DIR), and
ITK_SOURCE_DIR points to the ITK source directory.

Hope this helps,
	Paul.

--
 [ signature omitted ] 

Message 3 in thread

Thanks for replying Paul. I tried it the way u mentioned using qmake and now
my Visual studio project gives me an error saying that it cannot find the
file-${ITK_DIR}/bin/debug.obj
I searched for this file and found that there is no such file. What am I
doing wrong here?
Can anyone please help me out?

Thanks,
Ashish

On 1/14/07, Paul Koshevoy <paul@xxxxxxxxxx> wrote:
>
> Ashish Singh wrote:
> > Hi,
> >
> > I am trying to integrate my simple ITK application with Qt. I am using
> > qmake, but having problems writing the ',pro' file. After I provide the
> > paths to include files and libraries and run qmake from the command
> > prompt, I get the '.vcproj' file. When I try to build this project from
> > inside the visual studio, it is not able to find the header file-
> > 'vnl/vnl_vector.h' and gives me the following error.
> >
> > c:\myinstalls\itk\insighttoolkit-3.0.0\code\io\itkImageIOBase.h(24) :
> > fatal error C1083: Cannot open include file: 'vnl/vnl_vector.h': No such
> > file or directory
> >
> > I have included the path to 'vnl_vector.h' in my qmake '.pro' file. I am
> > not able to figure out why is it not able to find the path. I tried Qt
> > with ITk, using Cmake, but there my visual studio project cannot find
> > the file ' qapplication.h', although I have the right paths and
> > libraries in place. Can anyone please tell me where am I going wrong?
> > Or else guide me to use ITK with Qt, either using qmake or cmake.
> >
> > Thanks,
> > Ashish
> >
>
> I had to add the following to my .pro file to get my Qt4 program to work
> with
> ITK 2.8.1:
>
> LIBS    +=      -L$$(ITK_DIR)/bin \
>                 -lITKNumerics \
>                 -lITKIO \
>                 -lITKNrrdIO \
>                 -litkgdcm \
>                 -litkjpeg12 \
>                 -litkjpeg16 \
>                 -litkopenjpeg \
>                 -litkpng \
>                 -litktiff \
>                 -litkjpeg8 \
>                 -lITKSpatialObject \
>                 -lITKNumerics \
>                 -lITKCommon \
>                 -litkvnl_inst \
>                 -litkvnl_algo \
>                 -litkvnl \
>                 -litknetlib \
>                 -litkvcl \
>                 -lm \
>                 -litksys \
>                 -lITKMetaIO \
>                 -lITKDICOMParser \
>                 -lITKEXPAT \
>                 -lITKniftiio \
>                 -lITKznz \
>                 -litkzlib \
>                 -lm
>
>
> INCLUDEPATH +=  $$(ITK_DIR)/Utilities/vxl/core \
>                 $$(ITK_DIR)/Utilities/vxl/vcl \
>                 $$(ITK_SOURCE_DIR)/Utilities/vxl/core \
>                 $$(ITK_SOURCE_DIR)/Utilities/vxl/vcl \
>                 $$(ITK_SOURCE_DIR)/Utilities \
>                 $$(ITK_DIR)/Utilities \
>                 $$(ITK_DIR)/Utilities/gdcm \
>                 $$(ITK_SOURCE_DIR)/Utilities/nifti/znzlib \
>                 $$(ITK_SOURCE_DIR)/Utilities/nifti/niftilib \
>                 $$(ITK_SOURCE_DIR)/Utilities/expat \
>                 $$(ITK_DIR)/Utilities/expat \
>                 $$(ITK_DIR)/Utilities/DICOMParser \
>                 $$(ITK_SOURCE_DIR)/Utilities/DICOMParser \
>                 $$(ITK_SOURCE_DIR)/Utilities/NrrdIO \
>                 $$(ITK_SOURCE_DIR)/Utilities/MetaIO \
>                 $$(ITK_SOURCE_DIR)/Code/SpatialObject \
>                 $$(ITK_SOURCE_DIR)/Code/Numerics/NeuralNetworks \
>                 $$(ITK_SOURCE_DIR)/Code/Numerics/Statistics \
>                 $$(ITK_SOURCE_DIR)/Code/Numerics/FEM \
>                 $$(ITK_SOURCE_DIR)/Code/IO \
>                 $$(ITK_SOURCE_DIR)/Code/Numerics \
>                 $$(ITK_SOURCE_DIR)/Code/Common \
>                 $$(ITK_SOURCE_DIR)/Code/BasicFilters \
>                 $$(ITK_SOURCE_DIR)/Code/Algorithms \
>                 $$(ITK_DIR)
>
> Here ITK_DIR points to the ITK build directory (ITK_BINARY_DIR), and
> ITK_SOURCE_DIR points to the ITK source directory.
>
> Hope this helps,
>         Paul.
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>

Message 4 in thread

Ashish Singh wrote:
> Thanks for replying Paul. I tried it the way u mentioned using qmake and
> now my Visual studio project gives me an error saying that it cannot
> find the file-${ITK_DIR}/bin/debug.obj
> I searched for this file and found that there is no such file. What am I
> doing wrong here?

Not sure, but in my case I am not using MSVS, I use GPL Qt4 with mingw.
Also, notice that I don't have ${ITK_DIR}/bin/debug.obj anywhere in the sample
project file I cut-n-pasted. Perhaps you are building your project in debug mode
and you built ITK in release mode? I am just guessing here, but that's something
else you can try -- build both using the same mode, maybe it will work. If that
doesn't work, you'll have to investigate further.

	Paul.

--
 [ signature omitted ]