[vtkusers] vtkImagePlaneWidget Transparency/Windowing Problems
David Kushner
root at davidkushner.me
Fri Apr 24 17:18:18 EDT 2015
I'm currently building an application based heavily on the source provided
in the QtVTKRenderWindows example (
https://github.com/Kitware/VTK/blob/master/Examples/GUI/Qt/FourPaneViewer/QtVTKRenderWindows.cxx)
using VTK 6.1. The only appreciable difference between my implementation
and the one laid out in the example is the fact that, rather than using the
vtkDICOMImageReader class, I'm loading our DICOM CT image in with ITK 4.8
and then converting it to the corresponding VTK image format using the
itk::ImageToVTKImageFilter. I'm not sure if this is relevant to the issue
I'm having, but I figure it couldn't hurt.
The issue is, though the image loads and renders just fine, the windowing
applied to the image does not display transparency for out-of-window values
as I would expect (and maybe this expectation is completely silly). The
pixel type I'm using for the images, since they are CT scans, is `signed
short`. The result I am seeing when I start my application is this:
[image: Inline image 1]
(http://i.imgur.com/vRkN0Ak.png)
Apologies if it is inappropriate to paste images inline or at all. As you
can see, though the background values contained in the CT slice solid
black, they are not exhibiting transparency as I would expect (or hope to
achieve). Would anyone have some advice on how to achieve a transparency
effect with this setup? I've tried a number of things from fiddling with
the windowing of the plane widgets, the windowing values and color map of
the renderer itself and then converting the image to an RGBA image before
sending it on to the plane widgets. None of these seemed to have any effect
on the outcome; the planes still rendered as opaque.
Any help would be GREATLY appreciated. It seems to me to be such a simple
task yet I've mired myself in the complexities of ITK/VTK.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150424/f9539f4d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 118468 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150424/f9539f4d/attachment.png>
More information about the vtkusers
mailing list