[vtkusers] How to eliminate points under threshold

Francois Louis LAILLIER flaillier at eldim.fr
Fri Mar 9 02:56:01 EST 2007


Hi Hank, I have the same problem.

 

I find a solution or tip.

 

The solution is to threshold your image, and set opacity = zero for the point equal to 0

 

But to gain time, I don’t threshold, and I apply opacity on my picture directly.

 

You obtain your volume (with raycastmapper I presume)

 

 

Create property as new vtkvolumeproperty

 

 

Create opacity as a new vtkpiecewisefunction

opacity.addpoint threshold,0  # The point under your threshold are transparent now.

opacity.threshold+1,1 # The point upper your threshold a opaque now.

 

Property.setscalaraopacity 0,opacity # maybe 0 does not here in your language.

 

Apply the opacity on your volume.

 

Volume.setproperty property and render it.

 

Tadddddaaaaaaaa. You can see your head…

 

Bye and good luck!

 

 

________________________________

From: vtkusers-bounces+flaillier=eldim.fr at vtk.org [mailto:vtkusers-bounces+flaillier=eldim.fr at vtk.org] On Behalf Of YaoHaofeng
Sent: vendredi 9 mars 2007 00:26
To: vtkusers at public.kitware.com
Subject: [vtkusers] How to eliminate points under threshold

 

Hi,
I have an 3d image which is a brain and the air surrounding it when scanned, when I render the data on the window, it gives me a red cube, which should be the air, and I cannot see the brain, how can I tell vtk not to render the air voxels and show only the brain voxels? I guess one way to do it using thresholding, but I am not quite sure, please help.

thanks

hank 

 

________________________________

中国十大热门旅游景点 了解更多信息! <http://search.msn.com/results.aspx?q=%E4%B8%AD%E5%9B%BD%E5%8D%81%E5%A4%A7%E9%A3%8E%E6%99%AF&mkt=zh-CN&form=QBRE> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070309/61ebed7e/attachment.htm>


More information about the vtkusers mailing list