How to calculate the VoxelValues using regionprops3
Show older comments
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{:});
Accepted Answer
More Answers (1)
Simon Chan
on 26 Jan 2023
Moved: Image Analyst
on 7 May 2023
0 votes
Did you try the following:
data = regionprops3(BW,spect,'Volume','VoxelValues', 'Centroid')
1 Comment
mohd akmal masud
on 26 Jan 2023
Moved: Image Analyst
on 7 May 2023
Categories
Find more on Region and Image Properties in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!