How to calculate the volume of tumor in logical image

3 ビュー (過去 30 日間)
mohd akmal masud
mohd akmal masud 2022 年 10 月 5 日
コメント済み: Bjorn Gustavsson 2022 年 10 月 19 日
Hi all
if i have logical image .mat as attached, how to calculate the volume of my tumor inside?

採用された回答

Bjorn Gustavsson
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 件のコメント
mohd akmal masud
mohd akmal masud 2022 年 10 月 17 日
Bjorn Gustavsson
Bjorn Gustavsson 2022 年 10 月 19 日
You're welcome!

サインインしてコメントする。

その他の回答 (0 件)

製品


リリース

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by