2

This question is related to this. In the case of Graphics3D, there is an option for Method->{"ShrinkWrap"->True}, however, there is no such option for Image3D.

Consider an example as

head = ExampleData[{"TestImage3D", "CThead"}];

and a sample rendering as

Image3D[head, 
 ColorFunction -> (Blend[{{0., 
   RGBColor[0.05635, 0.081, 0.07687, 0.]}, {0.277199, 
   RGBColor[0.987197, 0.564838, 0., 0.]}, {0.488426, 
   RGBColor[1., 0.793177, 0.257829, 1.]}, {0.583912, 
   RGBColor[1., 0.889247, 0.388486, 0.]}, {1., 
   RGBColor[1., 0.6436, 0.03622, 0.]}}, #1] & )]

I tried using the Method->{"ShrinkWrap"->True} option. But it does not work. How can I remove the white margins as it can be done for Graphics3D?

user36426
  • 3,335
  • 11
  • 29

1 Answers1

2

Do you mean something like this?

Show[
 Image3D[head, 
  ColorFunction -> (Blend[{{0., 
        RGBColor[0.05635, 0.081, 0.07687, 0.]}, {0.277199, 
        RGBColor[0.987197, 0.564838, 0., 0.]}, {0.488426, 
        RGBColor[1., 0.793177, 0.257829, 1.]}, {0.583912, 
        RGBColor[1., 0.889247, 0.388486, 0.]}, {1., 
        RGBColor[1., 0.6436, 0.03622, 0.]}}, #1] &), 
  ViewPoint -> {0, 0, Infinity}],
 Boxed -> False, PlotRangePadding -> None, 
 Method -> {"ShrinkWrap" -> True}]
Michael E2
  • 235,386
  • 17
  • 334
  • 747