[Insight-users] Bug reading DICOM Series with QApplication

Jesús Spí­nola jspinola at gmail.com
Thu Oct 8 05:51:21 EDT 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 have written a litlle program to reproduce the problem. It is very
simple, it declares the itk image format and the dicom reader, and tries to
read the files contained in a folder the user has provided as an argument in
the command line.
First, we only wrote the piece of code that reads the files, but it gave no
error or exception at all.
Later, we added the QApplication object in the main.cpp like you do in a
typical Qt application. Then, when we run the program, the exception
appeared again, so it seems there's some problem when using QApplication
with this version of itk (3.10.1).

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.

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



-- 
Jesús Spínola
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091008/dac26b3c/attachment.htm>


More information about the Insight-users mailing list