color map based on area
조회 수: 1 (최근 30일)
이전 댓글 표시
A 3D volume is constructed from a stack of 2D masks (slices). How to color each slice based on the area of the object inside. Suppose the volume is a trunk.
댓글 수: 2
Walter Roberson
2018년 7월 25일
Do you want all the pixels selected by the mask of a slice to be the same color? Or do you want to shade by value, different brightness of the color according to pixel value?
답변 (2개)
Walter Roberson
2018년 7월 25일
colorval = repmat( sum( sum( masks3d, 1), 2) ), size(masks3d, 1), size(masks3d, 2), 1 ) .* masks3d;
vol3d('CData', colorval', 'alpha', double(masks3d))
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 3-D Volumetric Image Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!