How to calculate the volume image segmentation.

조회 수: 26 (최근 30일)
mohd akmal masud
mohd akmal masud 2022년 6월 2일
편집: VINAYAK LUHA 2023년 9월 28일
Dear All,
I have set Images as attached (matlab.mat). Then I upload in Volume Viewer Apps. Anyone know how to calculate the volume it self as picture?

답변 (1개)

VINAYAK LUHA
VINAYAK LUHA 2023년 9월 28일
편집: VINAYAK LUHA 2023년 9월 28일
Hi Mohd,
I understand that you want to determine the total volume created by a series of masked images.
You can achieve this in the following manner:
  1. Compute the volume of the masked region in each image slice by multiplying the number of non-zero pixels with the thickness of the slice (assumed 1px).
  2. Sum up the volumes of each individual image slice to obtain the overall volume.
The code snippet of the steps mentioned above can be seen below:
data = load("vol.mat");
stackedImages = data.I131256;
sliceThickness=1;
volume =0;
for i=1:24
volume=volume + nnz(stackedImages(:,:,12))*sliceThickness;
end
disp("Volume of the object:"+num2str(volume)+" cubic pixels");
Hope this helps.
Regards,
Vinayak Luha

Community Treasure Hunt

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

Start Hunting!

Translated by