Page MenuHomePhabricator

MITK has problems handling certain dicom images
Closed, ResolvedPublic

Description

This issue was reported on the mailing list:

I have several patients data with PET-CT and MRI(T1,T2) images. When I was running at the first time the ./mitkWorkbench in dicom Editor I created a Local storage with a Patient X's MRI data.
Now, I have for every patient PET-CT and MRI data but I can read only the PET-CT data. Whenever I am reading an MRI data of Patient Y, Z it is reading the Patient X.
Running the workBench from the console, I could get the error message during the MRI data reading. Here it is:

inserting filePath: "/MRI/dicom/12080812/39010000/34539679.dcm"
database filename for
"1.3.12.2.1107.5.2.32.35231.2012080812334543397455002" is empty - we
should insert on top of it Going to insert this instance with
dbPatientID: 1
Statement: SELECT * FROM Series WHERE SeriesInstanceUID = ?
Used existing series: "1.3.12.2.1107.5.2.32.35231.2012080812283898279053207.0.0.20"
QSqlQuery::value: not positioned on a valid record

Event Timeline

Trying to read the same MRI data using Open. The first slide is read, from the second slice on a Segmentation fault (core dumped) ocure and the ./mitkWorkbench is closed automatically.
The last lines from the command window are:
DataNodeFactory: Loading DICOM series 71: Series UID 1.3.12.2.1107.5.2.32.35231.2012080813383091500675825.0.0.9
[28.800] 20 'MR' files (MR Image Storage) loaded into 1 mitk::Image
[28.800] multi-frame: No
[28.800] reader support: Supported
[28.800] pixel spacing type: In Patient
[28.800] gantry tilt corrected: No
[28.800] 3D+t: No
[28.800] --------------------------------------------------------------------------------
Segmentation fault (core dumped)

Comment. This data was saved from MR mashine without extension, it had to be added the dcm extension to "seen" by DICOM Editor.
I have some MRI data of brain, it can be loaded without any problem.

I saved the mitk.log, if you need it.
(Thank you for help in advance.)

Ok this is apparently a general problem in MITK. Changed Bug title and added Daniel and Markus to CC.
Fabiola, do you think you could provide us one of the dicom data which lets MITK crash? This would help us a lot to reproduce this bug and fix it.

I just tested it with one of our data which doesn't have the .dcm extension. It was loaded without errors.
I got another question Fabiola: Which version of MITK are you exactly using?

I will ask my supervisor, but probably I can't provide you the data. I am sorry:(

My MITK version is: v2012.12.0-139-g418e4c0 Revision: 418e4c079d9e9ff65931993df231e75024cd98f5

There is some debug log or something which I could provide you?

i can reproduce the seg fault,
and can provide some data for this (MR data with two different b values)

my data now works on the current master; but unfortunately i don't know what the changes were that made it work.
@fabiola
what exactly are the charaterisrics of the mri data ?
diffusion/time resolved/ ... ?
maybe i can find some that resemble your data to test it.

MRI specific params.

This bug has a high severity and was not fixed within the 2013-06 release. Setting target milestone to next release.

Hi Fabiola,

is this bug still present in the current release?

I now have some new MR data that also causes a segfault,
I'm not sure if it is the same problem as yours.

Could you check the output of dcmdump of your files
(http://support.dcmtk.org/docs/dcmdump.html)
for something like:

E: DcmElement: Unknown Tag & Data (,) larger () than remaining bytes () in file, premature end of stream
W: DcmItem: Dataset not in ascending tag order, at element (,)
E: dcmdump: Invalid stream: reading file:

Hi Christian,

It works! :) It reads nicely the PET-CT and MR-T1, T2 images.
I am using 2013.03.2 version.

I checked the dcmdump output though.
Are you still interested in? I found only these unknown tags, but no premature end of stream or wrong order:
(0019,1008) CS [IMAGE NUM 4] # 12, 1 Unknown Tag & Data
(0019,1009) LO [1.0] # 4, 1 Unknown Tag & Data
(0019,100b) DS [4230] # 4, 1 Unknown Tag & Data
(0019,100f) SH [Fast] # 4, 1 Unknown Tag & Data
(0019,1011) SH [No] # 2, 1 Unknown Tag & Data
(0019,1012) SL 0\0\-2035 # 12, 3 Unknown Tag & Data
(0019,1013) SL 0\0\-2035 # 12, 3 Unknown Tag & Data
(0019,1014) IS [0\0\0] # 6, 3 Unknown Tag & Data
(0019,1015) FD -128.062953950000008\-131.93480790999999\-10.373974280000001 # 24, 3 Unknown Tag & Data
(0019,1017) DS [1] # 2, 1 Unknown Tag & Data
(0019,1018) IS [8000] # 4, 1 Unknown Tag & Data

Thank you so much! Now I can use my data in MITK too. :)
Herzlichen Dank! :)