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
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
It is also changing color in the 3d window when you start rotating. Also I think this is more a rendering bug.
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
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.
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()
The color issue could be solved by removing directed lights from the vtkLightKit in the following way:
In function mitk::VtkPropRenderer::Initialize2DvtkCamera()
if(Standard2D)
{
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(); if(l->GetPositional()) GetVtkRenderer()->RemoveLight(l); else if(diffuse[0] != 0 || diffuse[1] != 0 || diffuse[2] != 0) GetVtkRenderer()->RemoveLight(l); else if(spedc[0] != 0 || spedc[1] != 0 || spedc[2] != 0) GetVtkRenderer()->RemoveLight(l); }
}
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.