forked from TunaliIlke/RDRG-v2.1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
outside_border.m
37 lines (36 loc) · 1.14 KB
/
outside_border.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function BW =outside_border(maskTmr,maskLung,sE,t)
% *************************************************************************
%function BW =outside_border(maskTmr,maskLung,sE,t)
% *************************************************************************
%
% ABOUT:
% This function finds the outside border of the lesion ROI.
%
% Please reference the below article if you use the features deriven by
% this code.
%
% REFERENCE:
%
% [1] Tunali et al. (2017). "Radial gradient and radial deviation radiomic
% features from pre-surgical CT scans are associated with survival among
% lung adenocarcinoma patients". Oncotarget, 8:96013-26.
% doi: https://doi.org/10.18632/oncotarget.21629
%
% Please read the readme.txt file for information on the usage of function.
%
% For questions: <Ilke.Tunali@moffitt.org>
%
% HISTORY:
%
% Created: February 2017
% Version 2.1 (January 2018)
%
% --> Copyright (C) 2018 Ilke Tunali
% *************************************************************************
s = strel('disk',sE);
BW = imdilate(maskTmr,s);
BW = BW.*maskLung;
if t == 1 % make donut or not
BW = BW-maskTmr;
end
BW = BW == 1;