Page MenuHomePhabricator

MITK fails to load PALETTE_COLOR image from GDCM-Data as color image (ITK4)
Closed, ResolvedPublic


With the current ITK4 migration branch (bug-10925), MITK crashes when loading test image OT-PAL-8-face.dcm

The crash can be avoided by the patch in

Afterwards MITK still produces a gray image because it provides the wrong pixel type in DicomSeriesReader. When the pixel type is modified to RGBPixel<unsigned char>, it seems that ITK generates a correct image, but the MITK image is initialized in a wrong way. Attached screenshot shows the generated image information (most of all 3 bits per element).

I'll push a branch that makes DicomSeriesReader ask ITK for RGBPixel.

OT-face.png (1×1 px, 151 KB)

Event Timeline

New remote branch pushed: bug-14954-rgbpixel-in-dicom

This ITK patch has been integrated into ITK master now:, I'm not sure about the ITK release this will be integrated, but I'll keep watching.

With minor modifications we can request to load images based on itk::RGBPixel (see branch). This leads to correctly colored images.

OT-face.png (1×1 px, 151 KB)

I just uploaded the wrong image, this here is AFTER the fix

OT-PAL-8-face.png (1×1 px, 268 KB)

To finish this ticket

  • we need to adapt test data to change expectations regarding OT-PAL-8-face, which is now RGB
  • we would have to wait for ITK 4.5 (or the next one containing the fix)

To acceleracte things, I propose to patch ITK unless it already contains the fix. A newly pushed branch contains such a patch already.

For the change in MITK-Data: attached is the new test expectation

New remote branch pushed: bug-14954-rgbpixel-in-dicom-proper

[74c560]: Merge branch 'bug-14954-rgbpixel-in-dicom-proper'

Merged commits:

2013-06-21 14:28:07 Daniel Maleike [92720e]
Link new test data (expectations)

2013-06-14 11:17:44 Daniel Maleike [f53f77]
Activate test OT-PAL-8-face again

2013-06-14 11:17:12 Daniel Maleike [939fe4]
Patch ITK to remove wrong assertion

2013-06-12 18:01:28 Daniel Maleike [cd4b69]
Reformat fix, remove "TODO" comments

2013-04-12 17:01:15 Daniel Maleike [131de4]
Quick solution for RGBPixel types in DicomSeriesReader

Fix is integrated, continuous clients for Mac, Windows, Linux all passed, including the reactivated test case.

A minor TODO was missing, Andreas just noticed me that the Resampler::DefaultPixelValue for tilt correction was undefined since my changes.

I forgot to check all TODOs that I introduced. Solution is working locally already.

New remote branch pushed: bug-14954-tilt-defaultpixelvalues

[a99a18]: Merge branch 'bug-14954-tilt-defaultpixelvalues'

Merged commits:

2013-07-03 18:11:13 Daniel Maleike [c75608]
Use itk::NumbericTraits to determine smallest possible value