[vtkusers] Image on vtkImagePlaneWidget looks darker than in vtkImageViewer2

Marco Sambin m.sambin at gmail.com
Mon Jan 23 07:05:45 EST 2012


Hi all.
I attach a screeshot showing the difference between how the same image
with the same Window/Level is displayed by vtkImagePlane and by
vtkImageViewer2. As you can see, the images look different.

My code looks more or less like this:

[...]
vtkImagePlaneWidget planeWidget = ...;
vtkImageViewer2 imageViewer = ...;
imageViewer.SetInput(planeWidget.GetResliceOutput());
imageViewer.SetColorWindow(planeWidget.GetWindow());
imageViewer.SetColorLevel(planeWidget.GetLevel());
[...]

I would really appreciate if someone could provide some explanation
about this difference.
Thanks in advance and best regards,

Marco Sambin

2012/1/20 Marco Sambin <m.sambin at gmail.com>:
> Hi all.
>
> I am implementing a MPR medical application, and I am using
> vtkImagePlaneWidget for the "3D view" of my volume, and a
> vtkImageViewer2 to view the resliced image in 2D. The input of my
> vtkImageViewer2 is set to "planeWidget.GetResliceOutput()". Also, I
> set the same window width and window level on both my
> vtkImagePlaneWidget and vtkImageViewer2.
>
> Nevertheless, the image looks considerably darker on the
> vtkImagePlaneWidget w.r.t. the vtkImageViewer2. By comparing with
> other viewers showing the same image at the same Window/Level, I would
> say vtkImageViewer2 is displaying the image "correctly", while
> vtkImagePlaneWidget is displaying it too dark.
>
> Can you suggest why?
>
> I think VTK lighting could cause this effect, but is default lighting
> different between vtkImagePlaneWidget and vtkImageViewer2?
>
> Thanks in advance for any hint.
>
> Regards,
>
> Marco
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MPRScreenshot.png
Type: image/png
Size: 78972 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120123/61d8013d/attachment.png>


More information about the vtkusers mailing list