2
$\begingroup$

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?

$\endgroup$

1 Answer 1

2
$\begingroup$

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}]
$\endgroup$

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.