# How to colorize a 3D image [closed]

I have a 3D image where the values are in {1/4, 2/4, 3/4, 4/4} and its size is {134, 134, 67}. I used Image3D to display it. However, I am wondering if there is a possibility to colorize the image by 4 different colors. I have an image like this 3d image

.

Image3D[image3D,ColorFunction->Hue] gives

I need just to use a kind of Opacity[] function to see all points.

• You've seen Colorize[]? – J. M. will be back soon Nov 24 '15 at 21:26
• J.M. -- I don't think Colorize works for 3D... only 2D. – bill s Nov 24 '15 at 22:00
• @bills it does take a ColorFunction option though. – dr.blochwave Nov 24 '15 at 22:04
• Possibe duplicates: (72363) and (38305)? – dr.blochwave Nov 24 '15 at 22:12
• Use ColorFunction -> "HueOpacity" instead of ColorFunction -> Hue. – J. M. will be back soon Nov 25 '15 at 5:16

How about adding ColorFunction' to your Image3D:
m = RandomChoice[{1/4, 1/2, 3/4, 1}, {4, 4, 4}];

m = RandomChoice[{1/4, 1/2, 3/4, 1}, {5, 10, 10}];
`