Page MenuHomePhabricator

Certain colors are not supported for images
Closed, WontfixPublic


Load Image (Pic3D)
Rightclick on datamanger node
Press "Color"
Some colors work, some don't

e.g. "Aquamarine" works, But "Flieder-Pink" is not working.

RGB (85, 255, 255) - Works
RGB (255, 170, 255) - Works only in 3D view, not in 2D View

Event Timeline

RGB (170, 170, 255) does not work as well

It is also changing color in the 3d window when you start rotating. Also I think this is more a rendering bug.

Still investigating... Wont make it in this release due to complex lighting problems

Minor loss of function. Only few values are not supported. Low importance overall.

Markus F.: To do check how the lighting in the VTK scene is and what goes wrong.

This bug could not be fixed within the 2013-06 release and has medium severity. Setting target milestone to unspecified.

This bug could not be fixed within the release 2013-06. Setting its target milestone to unspecified

@Basti and Markus: What is your last status here?

Markus, could u comment on this?

Its a lighting issue with VTK rendering presented by the default lighting parameters. We could resolve it in the 2D render window by removing all default lights and adding a single scene light with only ambient term enabled.

All colors are now rendered genuine in 2D.

However, in the 3D view the applied colors are different (brighter or darker) due to lighting effects. This can not be changed since other objects such as surfaces are not visualized properly.

New remote branch pushed: bug-11821-ChangeLightingIn2DView

By adding those new code lines we introduced a new issue we still need to investigate properly.

In the 2D renderwindow the vtk rendering did not work. It resulted in a black image. The cross hair was still shown, which implies that only vtk rendering is broken and not mitk GL rendering in the first frame.

When clicking in the render window the images were rendered properly.

For the 2D render windows RemoveAllLights() is applied (not introduced by us). The call of this method will hide the wrong lighting in the first rendered frame.

Only images are not rendered properly in the first frame. Other datatypes (point set, surfaces) seem to work.

Todo: Check mitkImageVtkMapper2D for a missing Modified() or Update()

User kolbch has pushed new remote branch:


The color issue could be solved by removing directed lights from the vtkLightKit in the following way:

In function mitk::VtkPropRenderer::Initialize2DvtkCamera()
vtkLightCollection* lc = this->GetVtkRenderer()->GetLights();

for(int i = 0 ; i<lc->GetNumberOfItems() ; ++i)
  vtkLight* l = dynamic_cast<vtkLight*>(lc->GetItemAsObject(i));
  double* diffuse = l->GetDiffuseColor();
  double* spedc = l->GetSpecularColor();
  else if(diffuse[0] != 0 || diffuse[1] != 0 || diffuse[2] != 0)
  else if(spedc[0] != 0 || spedc[1] != 0 || spedc[2] != 0)


However, the first frame is still rendered in a darker fashion. As previously assumed, this bug could be introduced by the ImageVtkMapper2D.

Changed the status of this bug into "Confirmed" since we still do not have a proper solution for the wrong lighting in the first rendered frame.
If the redesign of the ImageVtkMapper2D is finished, this bug should be investigated again.

kislinsk claimed this task.
kislinsk added a subscriber: kislinsk.
This task was automatically closed because it wasn't updated at least since July 2016 (over 2 years). Please re-open this task if you think that it is still relevant. This most probably means that you will resolve it.