Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 10 down vote accepted

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] &
share|improve this answer
    
I feel stupid now. I never noticed that! –  Szabolcs Dec 5 '13 at 23:10
1  
@Szabolcs I doubt anyone noticed :) –  Silvia Dec 5 '13 at 23:23
    
I didn't know that! A new world of possibilities... _ –  Ziofil Apr 7 at 20:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.