-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcreateColumnsAutomatically.asv
More file actions
25 lines (25 loc) · 952 Bytes
/
createColumnsAutomatically.asv
File metadata and controls
25 lines (25 loc) · 952 Bytes
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
function createColumnsAutomatically()
global lineScanFigureHandles
%set(lineScanFigureHandles.figure1,'Pointer','watch');
waitbarHandle = waitbar(0,'Creating columns');
signal = transformLSImageToSignal();
waitbar(waitbarHandle,)
%we define a 20% change between maxima and minima a significant change that
%indicates a real maxima
significantDelta = 0.2;
darknessThreshold = 0.32;
actualZero = 0.001;
intervals = findMaximasIntervalsInSignal(signal,significantDelta, darknessThreshold, actualZero,-1);
[numOfIntervals two] = size(intervals);
x = -1;
w = -1;
for i=1:numOfIntervals
x = intervals(i,1);
w = intervals(i,2);
drawColumn(x, w, createRandomColor(),1);
end
analyseColumn(x);
cell = getCellAtPosition(x);
deselectMarkedCell();
selectCell(cell. columnHandle, cell.refLineMarkerHandle);
set(lineScanFigureHandles.figure1,'Pointer','arrow');