How to command the Gradient Weight

조회 수: 2 (최근 30일)
mohd akmal masud
mohd akmal masud 2021년 5월 2일
Hi All, I've 83 frame image dicom. I try do the gradient weight segmentation.
But why only just one frame appear (as image attached)?
I Supposely the function imshow3D will show all the 83 frame as well.
Anyone can help me?
% Get a list of all files in the folder with the desired file name pattern.
myFolder = ('C:\Users\Akmal\Downloads\IQ NEMA GA68 51 (1)\2020-12__Studies\IQ NEMA GA68 5.1_IQ NEMA GA68 5.1_PT_2020-12-02_114711_SPINE_PET.PELVIS.DYN.Q600_n83__00000');
filePattern = fullfile(myFolder, '*.dcm'); % Change to whatever pattern you need.
theFiles = dir(filePattern);
for L = 1 : length(theFiles)
baseFileName = theFiles(L).name;
fullFileName = fullfile(theFiles(L).folder, baseFileName);
fprintf(1, 'Now reading %s\n', fullFileName);
% Now do whatever you want with this file name,
% such as reading it in as an image array with imread()
RZ(:,:,L) = dicomread(fullFileName);
end
sigma = 1.5;
W = gradientweight(RZ(:,:,L), sigma, 'RolloffFactor', 0.01, 'WeightCutoff', 1);
R = 149; C = 138;
hold on;
plot(C, R, 'r.', 'LineWidth', 1.5, 'MarkerSize',15);
title('Original Image with Seed Location')
thresh = 0.009;
[BW, D] = imsegfmm(W, C, R, thresh);
figure, imshow3D(BW)
title('Segmented Image')
hold on;
plot(C, R, 'r.', 'LineWidth', 1.5, 'MarkerSize',15);

답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by