Using volshow with AlphaData for an RGB volume
Show older comments
I'm using volshow to render two 3D volumes with one (V2) enclosing the other (V1).
V1 and V2 are 3D binary masks with the value of 1 inside the volumes and 0 everywhere else.
The RGB volume (V) is defined as follows.
V = zeros([size(V1) 3]);
V(:,:,:,2) = V1;
V(:,:,:,1) = V2;
Using volshow, I get the following picture, which is expected.

However, when I used the following AlphaData to render the outer volume (V2) to be transparent, the color is almost lost.
Adata = zeros(size(V1));
Adata(V2>0.5) = 0.5;
Adata(V1>0.5) = 0;

I tried a different setting for AlphaData as follows.
Adata = ones(size(V1));
Adata(V2>0.5) = 0.5;
Adata(V1>0.5) = 0;
However, the result is worse.

Has anyone had a similar problem?
Accepted Answer
More Answers (0)
Categories
Find more on Basic Display in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
