Recently, I stumbled upon the following surreal MRI-scan of broccoli:
and ever since the moment that I saw this I've been wondering whether it is possible to recreate the broccoli based on these images.
So is it possible to do this efficiently in Mathematica?
Answer
Image3D
can do this if we overcome two problems.
imgs = Import["http://i.stack.imgur.com/CQX0Q.gif"];
imgs = MapThread[SetAlphaChannel, {imgs, Binarize /@ imgs}]
Image3D[imgs, Background -> Black]
The second line makes all black in all the images transparent, this was the first problem.
The second problem is that the broccoli will be very flat. In order to fix this you may select the the image and click the "show options" button in the toolbar. If you change the voxel aspect ratio so that z is stretched five times compared to the x and y axis, you get this:
It is also possible to give it color:
colored = Colorize[#, ColorFunction -> ColorData["AvocadoColors"]] & /@ imgs;
imgs = MapThread[SetAlphaChannel, {colored, Binarize /@ imgs}];
Image3D[imgs, Background -> Black]
Animated:
Comments
Post a Comment