Newer
Older
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
close all
clear
addpath(genpath('../Functions'))
%% Defaults
Data_path = '..\..\..\..\..\..\LINX FP08.001\Activity 7 - bending - visualizations and tiff stacks\mat_file\';
samples = {'out_out_CD','out_out_MD','in_in_CD','in_in_MD'};
degree = {'0','45','90','180'};
layer_name = {'outer','inner'};
%% extract poitns for the pipeline
clc
flag_points = 0; % 1 if no point has been extracted and first time use of the code
if flag_points
for i = 1
sample = samples{i};
for j = 1:4
dg = degree{j};
%% load data
load([Data_path,'Processed_',sample,'_',dg])
%% use the pre_processing to extract the points
PointSelection
end
end
end
clearvars -except Data_path samples degree layer_name
%% layer segmentation and investigation
clc
answer = questdlg('Do you want to enhance the contrast? ','Contrast:','No','Yes','No');
for i = 1
sample = samples{i};
for j = 1:4
%% load data
dg = degree{j};
fprintf('Load Data %s %s \n',sample,dg)
load([Data_path,'Processed_',sample,'_',dg])
%% use the pre_processing to extract the points
% detect the layers
layer_name = {'outer','inner'};
for l = 1:length(layer_name)
flag_layer = layer_name{l};
disp(['Layer Detection ',flag_layer])
load(['Results\point\',flag_layer,'_points_',sample,'_',dg])
Delta_LU = [3, 7];
if any(strcmp(dg,'0') | strcmp(dg,'45'))
range = 15:-1:-15;
else
switch flag_layer
case 'inner'
range = 30:-1:-35;
case 'outer'
range = 20:-1:-20;
end
end
LayerDetection
end
%% measure
disp('Measure ...')
PrepMeasure
%% registration
disp('Registration ...')
PrepRegistration
end
end
%% visualize the measure
for i = 1%:4
Measure
end
close all
%% apply the registration
for i = 1%:4
Registration
end
close all
%% apply the alignment and transformation
for i = 1%:4
Transformation
end
close all
%% convert the meshes
for i = 1%:4
Export2inp
end
close all