[Qt-interest] Bug using Insight Toolkit (itk) with QApplication

Jesús Spí­nola jspinola at gmail.com
Fri Oct 9 10:20:42 CEST 2009


Hello,

I'm a developer of a cross platform DICOM Viewer application. It uses Qt
libraries ( version 4.5.0 ) for the GUI, itk to read the images (with GDCMIO
precisely) and vtk to display them.

Until now, we were using itk 2.8.1 and all was quite fine. Now, we are
looking forward to update the itk libraries to a more recent version but we
have encountered a problem. We tried itk 3.10.1, and for some series of
images, it gives an exception error when loading the files, and the data is
not loaded in memory at all, so it's not possible to view any image.

We wrote a little program to find out the problem consisting only in the
code to load the images. For our surprise the exception did not appeared
when it was expected to. Then we added the QApplication to the main.cpp of
the program to reproduce the problem to be more similar to the real code and
then the exception do appeared! So it seems there is some conflict when
using QApplication with this library to load the images (that wasn't with
earlier versions of itk). We don't know if the problem is in the Qt or the
itk side, so we posted this problem to the insight users mailing lists too.

We also tried with an earlier version of itk and a later version. With the
earlier (3.6.0) the problem doesn't appear, and with the later ( 3.14.0 ) it
continues appearing.

The exception message we get is the following:

*itk::ERROR: Image(0x9ae0b78): Bad direction, determinant is 0. Direction is
1 0 0
0 0 0
0 0 0*

We tested this under a kubuntu 9.04

You can download the source code of the program and additional data from
http://www.box.net/shared/ctjvebgnr5

All those files are compressed using gzip (bug.tar.gz) It contains the
main.cpp to reproduce the problem, with the respective project file for qt (
bug.pro) and a folder with two dicom images that reproduces the problem.

To compile the program you will need qt 4.x libraries to be installed ( 4.5
preferably to better reproduce the problem ) and itk libraries too (wich are
in the common kubuntu repositories, the packages needed are named
libinsighttoolkit3-dev
and libinsighttoolkit3 ).

Follow this steps to get and run the executable:

1. qmake bug.pro          # generate the makefiles
2. make debug              # compile the program with debug info
3. ./bug-3.10.1 data/     # run the program, passing the directory
containing the image data to load


It's a weird problem and we would like to know where is the problem exactly,
because we don't know why is this error appearing when using the
QApplication object.

Kind regards,

-- 
Jesús Spínola
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091009/c359c0a3/attachment.html 


More information about the Qt-interest-old mailing list