3D Image Enhancements
By default, 3D images do not respond to lighting. The color values are purely determined by the given color function.
show complete Wolfram Language input
In[3]:=
![Click for copyable input](assets.en/3d-image-enhancements/In_15.png)
img3d = Image3D[data, "Byte", options, ImageSize -> 400]
Out[3]=
![](assets.en/3d-image-enhancements/O_22.png)
Turning on volume lighting can help to highlight surface details. In this case, a directional light is added pointing into the plane of the screen, and specularity is added to the image object.
In[4]:=
![Click for copyable input](assets.en/3d-image-enhancements/In_16.png)
ImageCrop[
Show[Graphics3D[Specularity[Orange, 3], Background -> Black],
Image3D[img3d, Method -> {"VolumeLighting" -> True}], options,
Lighting -> {{"Directional", White, ImageScaled[{0, 0, 2}]}},
ImageSize -> 700], {410, 410}]
Out[4]=
![](assets.en/3d-image-enhancements/O_23.png)
Grainy images can be further enhanced by interpolating the values.
In[5]:=
![Click for copyable input](assets.en/3d-image-enhancements/In_17.png)
fine = ImageCrop[
Show[Graphics3D[Specularity[Orange, 3], Background -> Black],
Image3D[img3d,
Method -> {"VolumeLighting" -> True,
"InterpolateValues" -> True}], options,
Lighting -> {{"Directional", White, ImageScaled[{0, 0, 2}]}},
ImageSize -> 700], {410, 410}]
Out[5]=
![](assets.en/3d-image-enhancements/O_24.png)
Visualize the transition from the original to the interpolated and highlighted image.
show complete Wolfram Language input
In[7]:=
![Click for copyable input](assets.en/3d-image-enhancements/In_19.png)
Animate[Overlay[{original, SetAlphaChannel[fine, i]}], {i, 0, 1},
AnimationRate -> 1/3, AnimationDirection -> ForwardBackward]
![](assets.en/3d-image-enhancements/swf_5.png)
![](assets.en/3d-image-enhancements/O_25.png)