Skip to content
Snippets Groups Projects
Commit 32e25ea7 authored by Wolfgang Ludwig's avatar Wolfgang Ludwig Committed by Nicola Vigano
Browse files

Fix problem with selected image in gtSetupSegmentation_doublethr

Add 3rd parameter to gtMathVectorAngles
parent 24cd7fa4
No related branches found
No related tags found
No related merge requests found
......@@ -321,18 +321,20 @@ fnames = fnames(ind);
% get 4 evenly spaced images
check = inputwdefault('Do you have any suggested numbers ofr images? [y/n]','n');
check = inputwdefault('Do you have any suggested numbers for images? [y/n]','n');
getfulls = 1;
if strcmp(check, 'y')
getfulls = input('Insert image numbers in squared brackets (the first 4 are used):');
end
% remove duplicates if existing
getfulls = unique(getfulls);
if length(getfulls) < 4
getfulls = [getfulls, round(1:(length(fnames)/(4-length(getfulls))):length(fnames)) length(fnames)];
elseif length(getfulls) > 4
% remove exceeding numbers
getfulls(5:end,:) = [];
end
% remove duplicates if existing
getfulls = unique(getfulls);
disp('Using those images to segment: ')
disp(getfulls)
......@@ -516,13 +518,13 @@ set(h_imp,'Position', [10 h_figpos(4)-30 150 30]);
% change the full image
function sfChangeFull(fig, eventdata)
StackIndex = find([u1 u2 u3 u4 u5] == eventdata.NewValue);
full_im = fullstack(:, :, StackIndex);
full = fullstack(:, :, StackIndex);
ThreshFull = threshstack(:,:,StackIndex);
Values.ShowThresholded = false;
subplot(1,2,1)
imshow(full_im, gtAutolim(full_im))
imshow(full, gtAutolim(full))
% open impixelinfo in upper left corner
figpos = get(fig,'Position');
......@@ -542,7 +544,7 @@ set(h_imp,'Position', [10 h_figpos(4)-30 150 30]);
if (Values.ShowThresholded)
% check just the first pixel
if (ValuesChanged || isnan(ThreshFull(1)))
ThreshFull = sfDoThresholding(full, Values);
ThreshFull = sfDoThresholding(full, Values); %changed here
threshstack(:, :, StackIndex) = ThreshFull;
else
% if we already have a non NaN ThreshFull
......
......@@ -10,4 +10,4 @@ disp(' angrad = gtMathsVectorsAnglesRad(v1,v2,colvec)')
disp(' angdeg = gtMathsVectorsAnglesDeg(v1,v2,colvec)')
error('Function is out-of-date!')
end
\ No newline at end of file
end
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