[vtkusers] Volume Rendering Problem

EvilMax maxim.privalov at gmail.com
Thu Dec 15 08:27:47 EST 2011


Hi!

About first part. How do you imagine such thing like 'negative color' or
'negative intensity'? This is nonsense. Color or intensity represented by PC
video subsystem is always a positive number, and black is zero. So search
for visible 'negative intensities' is a conceptually wrong way to do your
task. 

To resolve that 'collision' you just need to map negative values to some
colors, so you can detect them. For example, lowest negative will be black,
and highest value is white - if grayscale. Or map to some colors, so, for
example, negative will be red spectrum, positive - blue, similar to real
world frequencies :)

Another way is to shift your image to zero and do the same thing. In that
case you can use GPU acceleration, so I would suggest to use this solution.

About vtkPiecewiseFunction. Look here for usage examples, it will help you a
lot such as helped me some time ago:
http://vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/VolumeRendering/Cxx/GPURenderDemo.cxx

--
View this message in context: http://vtk.1045678.n5.nabble.com/Volume-Rendering-Problem-tp5074663p5077466.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list