16
$\begingroup$

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?

$\endgroup$

1 Answer 1

17
$\begingroup$

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] &
$\endgroup$
10
  • 1
    $\begingroup$ I feel stupid now. I never noticed that! $\endgroup$
    – Szabolcs
    Dec 5, 2013 at 23:10
  • 1
    $\begingroup$ @Szabolcs I doubt anyone noticed :) $\endgroup$
    – Silvia
    Dec 5, 2013 at 23:23
  • $\begingroup$ I didn't know that! A new world of possibilities... _ $\endgroup$
    – Ziofil
    Apr 7, 2014 at 20:50
  • 1
    $\begingroup$ @Masi If my memory is correct, it was Windows 8 64bit. Regarding your problem, I think you might get more help from the WRI company. They are more expert than any users and they might already have some solutions. $\endgroup$
    – Silvia
    Sep 25, 2016 at 10:08
  • 1
    $\begingroup$ @Masi Sorry for the acronym. Yes WRI = Wolfram Research, Inc. I think their support is your best chance for solving the problem. $\endgroup$
    – Silvia
    Sep 25, 2016 at 18:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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