Page MenuHomePhabricator

RGBA-pictures are not displayed in MainApp
Closed, ResolvedPublic

Description

If you try to view a RGBA picture in the MainApp, nothing is displayed, although it is correctly inserted into the DataTree

Event Timeline

Relocate bug to MITK / Rendering

RGBA pictures are rendered as white in 2D views (if alpha channel is 255), but correctly in 3D views. (tested for 2D images, but the problem seems to be the same in 3D)

The reason for this bug is that the (pre-MITK) IIL utility library which is (still) used for rendering images in 2D views does not support RGBA images (it supports RGB images and color-table-mapped RGBA images, but not plain unsigned char RGBA images).

Two possible solutions:

1.) Adapt IIL to support unsigned char RGBA

2.) Remove usage of IIL and base 2D image mapping (and possibly all 2D mapping) on VTK

Solution 1.) is much simpler, but solution 2.) may be a much cleaner way in the long run.

To be discussed.

Will implement solution 1.) for now. Solution 2.) has got a seperat bug: T3177

Experimental code in attached patch

commiting solution 1:

next commit will be the updated IIl4MITK library with support for RGBA images

[SVN revision 21348]
ENH (#1717): updated IIL4MITK to support RGBA

[SVN revision 21422]
ENH (#1717): imagemapper2d now uses the new iil4mitkImage::RGBA and pixeltype supports now itk::RGBAPixel