Image viewer fix overlay

Copied from pcl-developers:
Hi guys,

I am using ImageViewer currently to draw some shapes on an image.
The problem is the following : when I add a rectangle or whatever shape to the image it gets darker.
I've looked around and it seems the problem is the way we are handling opacity.
We are setting the vtkImageCanvasSource2D to take the image full extent and when we set the opacity, the whole extent gets affected.
Unfortunately there is no way to set the opacity of only the drawn shape using vtkImageCanvasSource2D while what we really want is an overlay.
I found a solution using vtkContexItem and modified the ImageViewer so that now it renders overlay without affecting the whole image extent i.e. we can set the opacity of the shape without affecting the opacity of the background image.