Page MenuHomePhabricator

some binary image do not show up in 3D planes
Closed, ResolvedPublic

Description

some binary images are rendered as expected in 2D render windows, but the planes in the 3D render window remain black.
Example dataset: /home/jochen/temp/uchar-testimage.vti

it could be that this is because the pixeltype in this image is unsigned char. another test with a binary image with pixel type unsigned short showed up correctly.

Event Timeline

This is due to a change from Mathias, which turned off the mapping of color (RGBA) scalars (unsigned chars) through the lookup table for the 3D texture. Anyhow, binary images are also (single channel) unsigned chars, and bypassed the LookupTable too.

-> Can be fixed by:

if( binary )

texture->MapColorS/calarsThroughLookupTableOn();

else

texture->MapColorScalarsThroughLookupTableOff();

Mathias, comment please, okay for you?

Solution looks fine to me! It is strange though that VTK interprets 1-component unsigned chars as color...

Asking for Core Mod; raised severity to normal;

ok, good that this has been found