How to calculate the VoxelValues using regionprops3

4 ビュー (過去 30 日間)
mohd akmal masud
mohd akmal masud 2023 年 1 月 26 日
移動済み: Image Analyst 2023 年 5 月 7 日
Dear all, how to calculate the voxelvalues using regionprops3 after did the segmentation method.
Let say my gray image is spect as attached.
clc
clear all
close all
[spect map]=dicomread('I-13125610N1.dcm');
info = dicominfo('I-13125610N1.dcm');
%gp=info.SliceThickness;
spect=(squeeze(spect));%smooth3
cc= [25,25,27]
imshow3D(spect)
% T = adaptthresh(spect, 0.000000000000001);
T = adaptthresh(spect, 0.000000000000001, "NeighborhoodSize", cc, "Statistic","mean");
BW = imbinarize(spect,T);
figure, imshow3D(BW)
data = regionprops3(BW,'Volume',spect,'VoxelValues', 'Centroid')
Error using regionprops3>getPropsFromInput
PROPERTY must be a string or character vector.
Error in regionprops3>parseInputs (line 1018)
reqStats = getPropsFromInput(startIdxForProp, ...
Error in regionprops3 (line 158)
[V,requestedStats,officialStats] = parseInputs(imageSize, args{:});

採用された回答

Dinesh
Dinesh 2023 年 3 月 31 日
移動済み: Image Analyst 2023 年 5 月 7 日
Hi Akmal,
I understand that you are trying to find the voxel values using regioprops3. Regionprops3 is expecting "black and white image (BW), 3D volumetric grayscale image (V), and then properties" as input. Here you have changed the order of input. After 'BW' you have specified 'Volume' which is a property, then you specified 'V' and that is why you are getting the following error. Change the order to BW, V and then properties will solve the issue.
Please read the following MATLAB documentationon all available function overloads and properties for regionprops3 function.
Thank you

その他の回答 (1 件)

Simon Chan
Simon Chan 2023 年 1 月 26 日
移動済み: Image Analyst 2023 年 5 月 7 日
Did you try the following:
data = regionprops3(BW,spect,'Volume','VoxelValues', 'Centroid')
  1 件のコメント
mohd akmal masud
mohd akmal masud 2023 年 1 月 26 日
移動済み: Image Analyst 2023 年 5 月 7 日
tq @Simon Chan. its work

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

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by