set opacity to M x N x P grayscale matrix
古いコメントを表示
I have a matrix define as data = rand(M,N,P) where M = 262, N = 359, P = 562. Each element in the matrix gets assigned an intensity value for 0 - 255 depending on input scan data.
E.g. data(200,220,232) = 32 or data(200,220,233) = 156
How can i assign transparency to each element in the matrix based on the intensity value. For example: all intensities below 128 have 0.8 transparency, and every value between 128-255 has linear opacity from 0.1-0.4
This is all in Matlab.
Thank you
採用された回答
その他の回答 (1 件)
Walter Roberson
2014 年 1 月 25 日
0 投票
Transparency is a property of images, not of matrices. And there is no build-in method in MATLAB to create a 4-dimensional plot (three axis plus value at each point = 4 dimensions.) You have to define how you are planning to display the data, and then we can talk about transparency.
2 件のコメント
varun
2014 年 1 月 25 日
Walter Roberson
2014 年 1 月 25 日
I would have to look more closely at the program some time. I think it is creating patch objects with 3D volume areas (marching cubes algorithm I seem to recall.) If it is, then a patch() would have been generated; try
findobj(gca, 'type', 'patch')
Once you find that patch object, you can adjust it's AlphaCData property
カテゴリ
ヘルプ センター および File Exchange で Neighborhood and Block Processing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

