Page MenuHomePhabricator

Several DICOM datasets cannot be loaded correctly anymore
Closed, ResolvedPublic

Description

Several DICOM datasets cannot be loaded anymore (ExtApp crashes) that were already possible to load in the past. Other DICOM datasets are loaded incorrectly regarding the order of slices/files. This is a major bug because it already occured externally and made it impossible to use MITK.

Crashing datasets: \\AD\fs\E130-Projekte\Heart\DICOM\Angio\ISTA*\DICOM
Messed up dataset: \\AD\fs\E130-Projekte\Heart\DICOM\S8

Event Timeline

Found the problem for crashing data sets. If there is a file in a dicom folder that is not a dicom image, the DicomSeriesReader open it as image anyway - BAM!

Wrote a WIKI Specification Page and awaiting Core Modification Flag. All files in a DICOM directory get tested by IsDicom() before opening as such.

The messed up datasets will be handled in a seperate bug.

Since IsDicom() is a rather expensive operation, I'll fix this bug in another way.

Ok, the bug is now fixed more effectively. Check the Wiki Specification Page for details.

I pushed the branch named bug-12642-DICOMDatasetCrashNewApproach.

Ok, but regarding testing, please add an automated test to make sure your data is loaded correctly. Have a look at http://mitk.org/git/?p=MITK.git;a=blob;f=Core/Code/Testing/DICOMTesting/DICOMTesting.dox.h, which is somehow now generated int HTML at the moment.

Ok, thanks. I'll implement an automated test case during the very next bug squashing party.

[70107a]: Merge branch 'bug-12642-DICOMDatasetCrashNewApproach'

Merged commits:

2012-07-19 11:36:50 Stefan Kislinskiy [b9be8f]
Fixed crash which occured when loading a DICOM series that contains a localizer image.

It was assumed that accessing a map element by a nonexistent key would raise an excpetion. Instead a new element is inserted and its default constructor is called. The presence of the map element is now checked in advance.