Skip to content
Snippets Groups Projects
Commit 6de74b29 authored by Nathan Spaeth's avatar Nathan Spaeth
Browse files

Merge branch 'MultiCellTypes' of 129.89.58.155:c:/gitroot/LEVer into origin_MultiCellTypes

Conflicts:
	src/MATLAB/+Tracker/GraphEditSetEdge.m
parents 46bd770f 768f16ac
No related branches found
No related tags found
No related merge requests found
function ImageFileDialog()
function bOpened = ImageFileDialog()
global CONSTANTS
oldCONSTANTS = CONSTANTS;
......@@ -8,17 +8,9 @@ load('LEVerSettings.mat');
%find the first image
imageFilter = [settings.imagePath '*.TIF'];
sigDigits = 0;
fileName = [];
tryidx = 0;
bOpened = 0;
while ( (sigDigits == 0) || ~exist(fileName,'file') )
if ( tryidx > 0 )
fprintf('Image file name not in correct format:%s_t%s.TIF\nPlease choose another...\n',CONSTANTS.datasetName,frameT);
else
fprintf('\nSelect first .TIF image...\n\n');
end
while ( ~bOpened )
[settings.imageFile,settings.imagePath,filterIndexImage] = uigetfile(imageFilter,'Open First Image in dataset: ');
if (filterIndexImage==0)
CONSTANTS = oldCONSTANTS;
......@@ -27,13 +19,24 @@ while ( (sigDigits == 0) || ~exist(fileName,'file') )
[sigDigits imageDataset] = Helper.ParseImageName(settings.imageFile);
if (~strcmp(imageDataset,CONSTANTS.datasetName))
answer = questdlg('Image does not match dataset would you like to choose another?','Image Selection','Yes','No','Close LEVer','Yes');
switch answer
case 'Yes'
continue;
case 'No'
CONSTANTS.imageNamePattern = '';
bOpened = 1;
case 'Close LEVer'
return
otherwise
continue;
end
end
CONSTANTS.rootImageFolder = settings.imagePath;
CONSTANTS.datasetName = imageDataset;
CONSTANTS.imageSignificantDigits = sigDigits;
CONSTANTS.matFullFile = [settings.matFilePath settings.matFile];
fileName = Helper.GetFullImagePath(1);
tryidx = tryidx + 1;
end
save('LEVerSettings.mat','settings');
......
......@@ -136,8 +136,10 @@ switch answer
CONSTANTS.matFullFile = [settings.matFilePath settings.matFile];
if (~isfield(CONSTANTS,'imageNamePattern') || ~exist(Helper.GetFullImagePath(1),'file'))
Helper.ImageFileDialog();
if (~isfield(CONSTANTS,'imageNamePattern') || exist(Helper.GetFullImagePath(1),'file')~=2)
if (~Helper.ImageFileDialog())
return
end
save('LEVerSettings.mat','settings');
end
......
......@@ -27,7 +27,11 @@
function GraphEditSetEdge(trackID, nextTrackID, time, bLongDistance)
global GraphEdits CachedCostMatrix CellTracks
if(exist('bLongDistance', 'var') && bLongDistance)
if (~exist('bLongDistance','var'))
bLongDistance = 0;
end
if(bLongDistance)
track = CellTracks(trackID);
if(isempty(track.hulls)) %check for valid track
trackHull = 0;
......
......@@ -38,7 +38,7 @@ if(isempty(CellFamilies(Figures.tree.familyID).tracks)),return,end
set(Figures.cells.timeLabel,'String',['Time: ' num2str(Figures.time)]);
%read in image
filename = Helper.GetFullImagePath(Figures.time);
if exist(filename,'file')
if (exist(filename,'file')==2)
img = Helper.LoadIntensityImage(filename);
else
img = zeros(CONSTANTS.imageSize);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment