<div dir="ltr">Brilliant, thanks Miro. Your suggestion worked well. I was hoping to be able to map 0-values (pure black) to total transparency while applying the 0.5 opacity to the remaining image. Is there a way to accomplish this specifically? This is just icing on the cake, I quite like the result I get with your suggestion but the background is still occluding some details of the planes behind. <div><br></div><div>Thanks again!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 24, 2015 at 3:02 PM, Miroslav Drahos <span dir="ltr"><<a href="mailto:mdrahos@thinksurgical.com" target="_blank">mdrahos@thinksurgical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Try<br>
planeWidget->GetTexturePlaneProperty()->SetOpacity(0.5);<br>
<br>
Best,<br>
Miro<br>
<br>
________________________________________<br>
From: vtkusers [<a href="mailto:vtkusers-bounces@vtk.org">vtkusers-bounces@vtk.org</a>] On Behalf Of David Kushner [<a href="mailto:root@davidkushner.me">root@davidkushner.me</a>]<br>
Sent: Friday, April 24, 2015 2:18 PM<br>
To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
Subject: [vtkusers] vtkImagePlaneWidget Transparency/Windowing Problems<br>
<span class=""><br>
I'm currently building an application based heavily on the source provided in the QtVTKRenderWindows example (<a href="https://github.com/Kitware/VTK/blob/master/Examples/GUI/Qt/FourPaneViewer/QtVTKRenderWindows.cxx" target="_blank">https://github.com/Kitware/VTK/blob/master/Examples/GUI/Qt/FourPaneViewer/QtVTKRenderWindows.cxx</a>) 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.<br>
<br>
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:<br>
<br>
</span>[cid:ii_14ced4775ccffd82]<br>
<div class="HOEnZb"><div class="h5">(<a href="http://i.imgur.com/vRkN0Ak.png" target="_blank">http://i.imgur.com/vRkN0Ak.png</a>)<br>
<br>
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.<br>
<br>
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.<br>
</div></div></blockquote></div><br></div>