Q:

Setting opacity for .vtk file

I tried to visualize a brain dataset. Actually, I think it works but I should set the opacity. From what I read on the internet, vtkpiecewisefunction must be used for solution.
However, when I change the code according to http://vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Medical/Cxx/Medical3.cxx, I encountered with a problem. I do not know how to change the reader and filter part of the code. The code, .vtk file and image that I get exist on the link: https://www.dropbox.com/sh/51kjftvdko3g6s8/wEe88Id9QN
Could you please tell me how I change this? Besides, you may inform me about another way of solution which adjusts the opacity of image.
Please let me know the image that you get is the same with the one on the link because it might be related to the graphics driver of my computer.
Thank you.

A:

When I want to change the opacity, I ause the actor:
actor->GetProperty()->SetOpacity(0.5);

