How to change volume'color ?

I use ParaView to import RAW file, Its results are as follows:


I want to use VTK to simuate this result, Its results are as follows:

and i want to change my result’s color ,how to change volume’color ?

There may be some Paraview users here who could answer your question, but this topic would be more appropriate for ParaView forum.

@Lee wants to know how to replicated ParaView’s volume rendering result in VTK, so it is appropriate for this forum.

You’ll need to set the color transfer function and opacity function to match what is in ParaView. Here is an example of how to set up such functions: https://lorensen.github.io/VTKExamples/site/Cxx/VolumeRendering/SimpleRayCast/.

Then, you’ll need to translate the transfer function settings from ParaView to code like in the example. Look at the values in the color table and opacity table in the Color Map Editor in ParaView (these are advanced settings, so click the gear icon to show them). Here’s a screenshot showing what I mean:

The gear button is on the right side near the middle of the image, and the values and colors are shown in the tables below that. Note that the color space is important.

Good luck!

1 Like

Thank you for your reply!
According to your advice, my problem has been solved.

Great, thanks for following up to let us know!

CTK maybe a good solution. As This question I have encountered.


Andras Lasso have give me a good solution