Skip to content
Snippets Groups Projects
Commit 06310132 authored by Mark Winter's avatar Mark Winter
Browse files

Fixes/Updates to SegAndTrackFolders for new initialization order/name parsing.

parent 81986a57
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,10 @@ function [status tSeg tTrack] = SegAndTrackDataset(rootFolder, datasetName, imag
system('mkdir .\segmentationData');
end
dirName = fileparts(CONSTANTS.rootImageFolder);
[dirName chkFile] = fileparts(CONSTANTS.rootImageFolder);
if ( ~isempty(chkFile) )
dirName = fullfile(dirName, chkFile);
end
for i=1:numProcessors
system(['start Segmentor ' num2str(i) ' ' num2str(numProcessors) ' ' ...
num2str(numberOfImages) ' ' CONSTANTS.cellType ' ' ...
......@@ -80,7 +83,7 @@ function [status tSeg tTrack] = SegAndTrackDataset(rootFolder, datasetName, imag
% Collect segmentation error logs into one place
errlog = fopen([datasetName '_seg_error.log'], 'w');
for i=1:length(bSegFileExists)
if ( bSegFileExists )
if ( bSegFileExists(i) )
continue;
end
fprintf(errlog, '----------------------------------\n');
......
......@@ -11,10 +11,10 @@ global CONSTANTS softwareVersion;
CONSTANTS=[];
softwareVersion = '6.1 Adult';
softwareVersion = '7.1 Multi-Cell';
Load.InitializeConstants();
Load.AddConstant('version',softwareVersion,1);
cellType = Load.QueryCellType();
Load.AddConstant('cellType',cellType,1);
directory_name = uigetdir('','Select Root Folder for Seg and Track');
if(~directory_name),return,end
......@@ -51,13 +51,23 @@ for dd=1:length(dlist)
end
CONSTANTS.rootImageFolder = [directory_name filesep dlist(dd).name];
CONSTANTS.datasetName = dlist(dd).name;
CONSTANTS.datasetName = [dlist(dd).name '_'];
CONSTANTS.matFullFile = fullfile(outputDir, [CONSTANTS.datasetName '_LEVer.mat']);
flist = dir(fullfile(CONSTANTS.rootImageFolder,'*.tif'));
if ( isempty(flist) )
continue;
end
Helper.ParseImageName(flist(1).name);
if exist(CONSTANTS.matFullFile,'file')
continue
end
Load.InitializeConstants();
Load.AddConstant('version',softwareVersion,1);
fprintf('seg&track file : %s\n',CONSTANTS.datasetName);
tic
CONSTANTS.imageAlpha=1.5;
......@@ -69,7 +79,7 @@ for dd=1:length(dlist)
continue;
end
if ( ~strcmpi(firstimfile, Helper.GetFullImagePath(1)) )
if ( ~strcmpi(firstimfile, Helper.GetImageName(1)) )
fprintf('\n**** Image list does not begin with frame 1 for %s. Skipping\n\n',CONSTANTS.datasetName);
continue;
end
......@@ -80,7 +90,7 @@ for dd=1:length(dlist)
continue;
end
UI.SaveData(1);
Helper.SaveLEVerState([CONSTANTS.matFullFile]);
Error.LogAction('Segmentation time - Tracking time',tSeg,tTrack);
end %dd
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment