-
Notifications
You must be signed in to change notification settings - Fork 0
/
.plan
38 lines (27 loc) · 833 Bytes
/
.plan
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
=== REGION GROWING ALGORITHM ===
Inputs: i by j by l array of grayscale values G,
seed location S in R³,
threshold value T
Output: Region list R
Initialize: Region list R <- 0
Available points list A <- {All voxels in the CT image}
Algorithm:
while A is not empty do:
Current region R_c <- 0
Current Seed S_c <- 0
R_c <- S
S_c <-S
A <- A \ S (remove S from A)
for seed in S_c do:
Find set of nearest neighbours B_c of S_c
for nb in B_c do
if A contains nb and nb_grayValue > T
Add nb to R_c
Add nb to S_c
A <- A \ nb (remove nb from A)
end if
end for
end for
Add R_c to R
end while
return R