How to calculate the volume of tumor in logical image
조회 수: 7 (최근 30일)
이전 댓글 표시
Hi all
if i have logical image .mat as attached, how to calculate the volume of my tumor inside?
댓글 수: 0
채택된 답변
Bjorn Gustavsson
2022년 10월 5일
You can simply calculate how many cells (voxels?) in your labels-variable are 1:
Voxels = sum(labels(:)==1)
That is the number of elements in labels that are 1, if each cell corresponds to voxels of the same size you just need to scale that sum with the voxel-volume. If the voxel-volume varies you'd have to take that into account too:
VoxelVol = sum((labels==1).*dV,'all');
where you'd have to supply a 3-D array dV of the same size as labels with the volume of the individual voxels.
HTH
댓글 수: 7
추가 답변 (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!