2010年6月22日 星期二

[VTK]Volume Rendering

Intro:
VTK (Visualization toolkit) is an open source toolkit to do visualization.

I'm now using it to do volume rendering.
It's fine to do it with 1 scalar per point, but I can't find a way to do it with RGBA dataset.
Bellow is what I found on the internet related to this topic.


Here is a link I found which might help with volume rendering data input.

This is a thread for converting SimpleRayCast example from tcl to C++


Yeah!! Found a thread that is really useful. Confirmed by one of the author of vtk, they support 4-component data.
Here is the thread:
http://markmail.org/message/7abjuh22f7eywxty#query:vtk%20imagedata%204%20components+page:1+mid:7abjuh22f7eywxty+state:results

And here is my final solution.
Use vtkFixedPointVolumeRayCastMapper (vtkVolumeTextureMapper3D doesn't work on my computer) and also set the independentComponentOff for the volumeProperty. The first three components will be read as RGB and the fourth channel data will through the opacity function mapping.

沒有留言:

張貼留言