How can I create this script??

2 ビュー (過去 30 日間)
Joao Joao
Joao Joao 2022 年 1 月 14 日
コメント済み: Joao Joao 2022 年 1 月 15 日
Hello everybody. I hope you are ok.
I have a get_segmentation_size() function, which allows opening the resulting binary mask from targeting a certain structure (eg the lungs or heart) of a certain patient and calculates its maximum width, maximum height and area (white region):
function [Width,Height,Area]=get_segmentation_size(SegmentationImage)
Area=0;
Height1=0;
Height2=100000;
Width1=0;
Width2=100000;
for i=1:2048
for j=1:2048
if SegmentationImage(i,j)~=0
Area=Area+1;
if Width1<=j
Width1=j;
end
if Width2>=j
Width2=j;
end
if Height1<=i
Height1=i;
end
if Height2>=j
Height2=j;
end
end
end
end
Width=Width1-Width2
Height=Height1-Height2
Area=Area
end
Now I have to develop another script that demonstrates the use of this function.
How can I do this?
Thanks for helping
  6 件のコメント
Rik
Rik 2022 年 1 月 14 日
I would suggest going back to whoever gave you this task and attempt to explain why it is counterproductive. If code is not commented/documented, it is not important.
Joao Joao
Joao Joao 2022 年 1 月 15 日
ok thanks

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

採用された回答

Steven Lord
Steven Lord 2022 年 1 月 14 日
If you're trying to create examples like the ones in this part of the documentation take a look at the tools described on this documentation page.
  1 件のコメント
Joao Joao
Joao Joao 2022 年 1 月 15 日
Ok thanks

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by