Skip to content

Commit 419740f

Browse files
committed
cleanup display of history
1 parent eab2c19 commit 419740f

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

ImageM/+imagem/+actions/+process/ImageExtendedMinWatershed.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848

4949
methods
5050
function run(obj, frame) %#ok<INUSD>
51-
disp('apply imposed watershed to current image');
5251

5352
% get handle to viewer figure, and current doc
5453
obj.Viewer = frame;

ImageM/+imagem/+actions/+process/ImageReplaceValue.m

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@
3434
%% Methods
3535
methods
3636
function run(obj, frame) %#ok<INUSL,INUSD>
37-
disp('Change Image Background Color');
3837

3938
% get handle to current doc
4039
doc = frame.Doc;
4140

42-
gd = imagem.gui.GenericDialog('Set Background Color');
41+
gd = imagem.gui.GenericDialog('Replace values');
4342
addTextField(gd, 'Old value(s): ', '1');
4443
addTextField(gd, 'New value: ', '0');
4544

@@ -67,7 +66,15 @@ function run(obj, frame) %#ok<INUSL,INUSD>
6766

6867
updateDisplay(frame);
6968

70-
69+
% update history
70+
nValues = length(oldValues);
71+
pattern = ['[%g' repmat(' %g', 1, nValues-1) ']'];
72+
str1 = sprintf(pattern, oldValues);
73+
tag = doc.Tag;
74+
string = sprintf('%s(ismember(%s, %s)) = %g;\n', tag, tag, str1, newValue);
75+
addToHistory(frame, string);
76+
77+
% utility function to parse a numeric value
7178
function val = parseValue(str)
7279
val = str2num(str); %#ok<ST2NM>
7380
if isempty(val)

ImageM/+imagem/+actions/+view/Image3DIsosurface.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function run(obj, frame) %#ok<INUSL>
131131
if ~isLabelImage(img)
132132
string = sprintf('isosurface(%s, %g);\n', doc.Tag, isosurfaceValue);
133133
else
134-
string = sprintf('%% isosurface of label image %s\n', doc.Tag);
134+
string = sprintf('regionIsosurfaces(%s);\n', doc.Tag);
135135
end
136136
addToHistory(frame, string);
137137
end

0 commit comments

Comments
 (0)