17

What is the default ColorFunction for Image3D? I find it a bit confusing that the most intense colour is not shown where the highest values appear:

data = Table[
   Exp[-3 (x^2 + y^2 + z^2)], {x, -1., 1, .01}, {y, -1., 
    1, .01}, {z, -1., 1, .01}];

Image3D[data, ClipRange -> {{100, 200}, {0, 200}, {100, 200}}, 
 ColorFunction -> Automatic] (* default colour function *)

enter image description here

Note that the bright yellow is not in the middle of the sphere. I wanted to understand what causes this effect (possibly some interplay of opacity and colours?). Otherwise I like the default. Did anyone try to reconstruct the default ColorFunction for Image3D?

Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263

1 Answers1

18

According to the documentation of Image3D, "an interactive color function editor is available via the Image3D contextual (right-click) menu". (And yes! I only found it after reading your question!)

contextual menu

ColorFunction editor

And you can get the explicit function by clicking the "Copy Function" button.

Blend[{
       {0., RGBColor[0.05635, 0.081, 0.07687, 0.00343663]},
       {0.1, RGBColor[0.8877, 0.2636, 0., 0.103093]},
       {0.3, RGBColor[1., 0.6036, 0., 0.302406]},
       {0.66, RGBColor[1., 0.9658, 0.4926, 0.661168]},
       {1., RGBColor[1., 0.6436, 0.03622, 1.]}
      }, #1] &
Silvia
  • 27,556
  • 3
  • 84
  • 164