Test Data:
Description
Related Objects
Event Timeline
A bit more detail after some investigation:
The modality tag "SEG" is ambiguous. It is used for the SOPClassUIDs SurfaceSegmentationStorage (1.2.840.10008.5.1.4.1.1.66.5) AND SegmentationStorage (1.2.840.10008.5.1.4.1.1.66.4).
The reader is only intended for the latter one. I attached one test file for each case.
SurfaceSegmentationStorage triggers an exception. This can be avoided by directly checking the SOPClassUID in the mimetype method MitkDICOMQIMimeType::AppliesTo.
SegmentationStorage triggers a crash. Needs further investigation.
Seems to be fixed. SEG_1_974 opens fine, SurfaceSegmentationStorage is recognized as unsupported format and SegmentationStorage results in an error output without crash:
90.08 core.mod.dicomReader.dicomFileReaderselector: Reader 5 (IPP 3D+t) suggests 1 3D blocks 90.88 core.mod.core.ioUtil ERROR: Exception occured when reading file SegmentationStorage.dcm: Invalid tag values when constructing tilt information from origin1 '', origin2 '', and orientation ''
Stack trace:
1 DcmSegmentation::getFrame segdoc.cc 416 0x7fff9c9df10e
2 dcmqi::ImageSEGConverter::dcmSegmentation2itkimage[abi:cxx11](DcmDataset *) ImageSEGConverter.cpp 537 0x7fff9d08090c
3 mitk::DICOMSegmentationIO::Read mitkDICOMSegmentationIO.cpp 297 0x7fff9d02f640
4 mitk::AbstractFileReader::Read mitkAbstractFileReader.cpp 108 0x7fffb5160a6b
5 mitk::IOUtil::Load[abi:cxx11](std::vector<mitk::IOUtil::LoadInfo>&, itk::VectorContainer<unsigned int, itk::SmartPointer<mitk::DataNode>> *, mitk::DataStorage *, mitk::IOUtil::ReaderOptionsFunctorBase const *) mitkIOUtil.cpp 719 0x7fffb56feee7
6 QmitkIOUtil::Load QmitkIOUtil.cpp 157 0x7fff9c181426
7 mitk::WorkbenchUtil::LoadFiles mitkWorkbenchUtil.cpp 141 0x7fff992ef1b3
8 QmitkDnDFrameWidget::dropEvent QmitkDnDFrameWidget.cpp 86 0x7fff89373f67
9 QWidget::event(QEvent *) 0x7ffff497ded8
10 QApplicationPrivate::notify_helper(QObject *, QEvent *) 0x7ffff494154c
11 QApplication::notify(QObject *, QEvent *) 0x7ffff4948ddf
12 QmitkSafeNotify<QtSingleApplication> QmitkSafeNotify.h 31 0x7ffff7bc5cff
13 QmitkSingleApplication::notify QmitkSingleApplication.cpp 33 0x7ffff7bc5a4e
14 QCoreApplication::notifyInternal2(QObject *, QEvent *) 0x7ffff76ce9f8
15 ?? 0x7ffff4999398
16 ?? 0x7ffff4999fbb
17 QApplicationPrivate::notify_helper(QObject *, QEvent *) 0x7ffff494154c
18 QApplication::notify(QObject *, QEvent *) 0x7ffff4948897
19 QmitkSafeNotify<QtSingleApplication> QmitkSafeNotify.h 31 0x7ffff7bc5cff
20 QmitkSingleApplication::notify QmitkSingleApplication.cpp 33 0x7ffff7bc5a4e
... <More>
Application output:
Simple volume reading: ignoring number of frames
Simple volume reading: ignoring number of frames
Simple volume reading: ignoring number of frames
Simple volume reading: ignoring number of frames
Simple volume reading: ignoring number of frames
System: MBI096
Processor: Unknown P6 family
Cache: 20480 Clock: 3499.875 Physical CPUs: 8 Logical CPUs: 16 Virtual Memory: Total: 32690 Available: 29702 Physical Memory: Total: 64291 Available: 55091
OSName: Linux
Release: 4.4.0-116-generic Version: #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 Platform: x86_64 Operating System is 64 bit
ITK Version: 4.12.2
Name Of Probe (Time) Iterations Total (s) Min (s) Mean (s) Max (s) StdDev (s)
Check input for DCM 1 0.057209 0.057209 0.057209 0.057209 0
Condensing 3D blocks 1 4.05312e-06 4.05312e-06 4.05312e-06 4.05312e-06 0
EquiDistantBlocksSorter 1 9.01222e-05 9.01222e-05 9.01222e-05 9.01222e-05 0
Output 1 0.000239134 0.000239134 0.000239134 0.000239134 0
Reset 1 4.05312e-06 4.05312e-06 4.05312e-06 4.05312e-06 0
Sorting frames 1 0.00514388 0.00514388 0.00514388 0.00514388 0
Sorting step 0 1 0.000104904 0.000104904 0.000104904 0.000104904 0
Sorting step 1 1 6.41346e-05 6.41346e-05 6.41346e-05 6.41346e-05 0
[6.261] Reader 0 (Instance Number, consecutive) suggests 1 3D blocks
[6.317] DICOM Modality is SEG
[6.418] loading /home/neher/Projects/SegmentationStorage.dcm
E: Cannot find Rows or Columns in dataset
E: Rows is not set correctly (0)
E: Columns is not set correctly (0)
Row direction: 0.007 1.000 -0.008
Col direction: 0.001 -0.008 -1.000
Z direction: -1.000 0.007 -0.001
Total frames: 46
Total frames with unique IPP: 46
Total overlapping frames: 0
Origin: [-1.507, -139.029, 108.989]
SegmentationStorage.dcm + DICOM Segmentation Reader
But I also tried other dicom segmentation objects, e.g. created using the Segmentation View. Same result.
That's the difference, I didn't enable DCMQI and selected the standard DICOM reader v2 (autoselect).
The application should no longer crash when a surfaceSegmentationStorage class DICOM is loaded.
I also added a check for the SOPClassUID in the MimeType of the DICOMSegmentation. At the Moment we can only handle the SegmentationStorage objects. -.-