Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to find the volume of a region in a segmented image?

1 回表示 (過去 30 日間)
ma_thal
ma_thal 2021 年 5 月 15 日
閉鎖済み: Matt J 2021 年 5 月 15 日
Hi, I segmented an MR image and have 3 regions, backgound with pixel value of 0, gray matter with pixel value of 1 and white matter of pixel value of 2. How can I get the volume of each of those regions?

回答 (1 件)

Matt J
Matt J 2021 年 5 月 15 日
stats = regionprops3(segmentationMap,'Volume')
  3 件のコメント
Image Analyst
Image Analyst 2021 年 5 月 15 日
Why not? Why prevent yourself from using a built-in function? Your post is not labeled as homework, which is usually the reason, so why not use it?
I was going to assume that you had 3 binary images, one for each segmentation that you want to do (background, gray matter, white matter) and that you could simply use nnz() on each binary image, but unfortunately you probably won't let yourself use nnz() either.
To find out what you can use, read this:
ma_thal
ma_thal 2021 年 5 月 15 日
Yes! it is homework, I'm new here so I didn't know I had to put that, I'm sorry..
Thank you for you idea. And I will check that link!

Community Treasure Hunt

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

Start Hunting!

Translated by