-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreconstructBrain.m
More file actions
33 lines (30 loc) · 1.15 KB
/
reconstructBrain.m
File metadata and controls
33 lines (30 loc) · 1.15 KB
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
function reconstructBrain(allPlanes_gray, gaussianSmoothing)
disp(">>> [INFO] Reconstructing the brain ...")
if gaussianSmoothing
sigma = 2;
X = imgaussfilt(allPlanes_gray, sigma); %Main/Processed set of slices
else
X = allPlanes_gray;
end
if brainReconstructAlgorithm == 1 % Iterative Shape Algorithm/Method (ISA)
%{
NOTE: this algorithm is usually used when registering many different
brains to the same averaged sample image. It removes
variabliity.
STEPS:
1. Choose a random image to register to from z-stack (per
animal)
2. Affine registration of all images to this initial reference
image
3. Iterative non-rigid registration
%}
elseif brainReconstructAlgorithm == 2 % Virtual Insect Brain (VIB)
%{
NOTE: this algorithm is usually used when it is required to
preserve the variability differences across samples.
%}
else
error("Unknown Brain Reconstruction Algorithm ... Aborting.")
end
disp(">>>>>> [INFO] ... Done!")
end