-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathSlicePrepper.m
More file actions
44 lines (36 loc) · 1.01 KB
/
SlicePrepper.m
File metadata and controls
44 lines (36 loc) · 1.01 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
44
function SlicePrepper(varargin)
%SlicePrepper Multi-species histology track annotation program
%% add subfolders
if ~isdeployed
%check version
PF_AssertVersion();
%disable buttons
global sUPF_ChooseGui %#ok<TLEV>
UPF_DisableButtons(sUPF_ChooseGui);
%add folders
strFullpath = mfilename('fullpath');
strPath = fileparts(strFullpath);
sDir=dir([strPath filesep '**' filesep]);
%remove git folders
sDir(contains({sDir.folder},[filesep '.git'])) = [];
cellFolders = unique({sDir.folder});
for intFolder=1:numel(cellFolders)
addpath(cellFolders{intFolder});
end
%enable buttons
UPF_EnableButtons(sUPF_ChooseGui);
end
%% try using Acquipix variables
try
sRP = RP_populateStructure();
strDefaultPath = sRP.strProbeLocPath;
catch
sRP = struct; %#ok<NASGU>
strDefaultPath=cd();
end
%% ask for folder & meta data (if any)
sSliceData = SH_LoadSlicePath(strDefaultPath);
if isempty(sSliceData),return;end
%% load slices & pre-process
SH_GenSlicePrepperGUI(sSliceData);
end