-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbeeConfocalAnalysis.m
More file actions
43 lines (34 loc) · 1.45 KB
/
beeConfocalAnalysis.m
File metadata and controls
43 lines (34 loc) · 1.45 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
34
35
36
37
38
39
40
41
42
43
%{
DATASETS: Reshma Basak
AUTHOR: Kambadur Ananthamurthy
PURPOSE: Floads the various .tif files in "~/Desktop/DATA/beeConfocal/", labels brain segments, and plots the surface area for each.
NOTES:
%}
tic %Start time for code run
clear
close all
zProjectAlgoList = ["Average Intensity"; "Max Intensity"; "Min Intensity"; "Median"; "Standard Deviation"; "Sum Slices"];
%Operations
saveData = 0; % Binary switch. 0: No (for testing). 1: Yes (for production run).
removeRed = 0; % Binary switch. 0: No; 1: Yes.
plotPlanes = 1; % Binary switch. 0: No; 1: Yes.
stepSize = 2; % in confocal z-steps
zProject = 1; % Binary switch. 0: No; 1: Yes.
gaussianSmoothing = 0; % Binary switch. 0: Nco; 1: Yes
brainReconstruct = 0; % Binary switch. 0: No; 1: Yes.
brainReconstructAlgorithm = 2; % Integer from 1 to 2. Here, 1. Iterative Shape Algorithm (ISA); 2. Virtual Insect Brain (VIB)
MenzelData = 1; % Categorical Switch. 0: Use normal data
HOME_DIR = '/Users/ananth/Documents/Bee/beeConfocalAnalysis';
DATA_DIR = '/Users/ananth/Desktop/Work/DATA/beeConfocal';
nPlanes = 100; % number of Z-planes (may vary with dataset)
startPlane = 1;
% Load each confocal plane, independently
allPlanes_gray = loadConfocalPlanes(MenzelData, DATA_DIR, startPlane, nPlanes, removeRed, plotPlanes, stepSize);
if zProject
plotZProjections(allPlanes_gray, zProjectAlgoList)
end
if brainReconstruct
reconstructBrain(allPlanes_gray, gaussianSmoothing)
end
estimatedTime = toc;
disp("[INFO] ... All Done!")