Skip to content

Commit

Permalink
fix camera manager on PC
Browse files Browse the repository at this point in the history
  • Loading branch information
jries committed Sep 13, 2021
1 parent 1620305 commit de2b3e3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 3 additions & 1 deletion +interfaces/imageloaderSMAP.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@
else
obj.calibrationFile=varargin{3};
end
else
obj.calibrationFile=[obj.getPar('SettingsDirectory') '/cameras.mat'];
end
if nargin>1 && ~isempty(varargin{2})
obj.updatemetadata(varargin{2});
obj.multiloadermetadata=varargin{2};
end
obj.calibrationFile=[obj.getPar('SettingsDirectory') '/cameras.mat'];

if nargin>0 && ~isempty(varargin{1})
obj.open(varargin{1});
end
Expand Down
Binary file modified settings/cameras.mat
Binary file not shown.
14 changes: 11 additions & 3 deletions shared/imageloaders/CameraManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function makeGui(obj)
obj.guihandles.loadcamerafile=uicontrol('Style','pushbutton','String','load camera file','Position',[posbutton height-40,buttonwidth,lineheight],'Callback',{@loadcamerafile,obj});


obj.guihandles.loadimages=uicontrol('Style','pushbutton','String','Load images','Position',[posbutton height-90,buttonwidth,lineheight],'Callback',{@loadimages,obj});
obj.guihandles.loadimages=uicontrol('Style','pushbutton','String','Load images','Position',[posbutton height-90,buttonwidth,lineheight],'Callback',{@loadimagesi,obj});
obj.guihandles.test=uicontrol('Style','pushbutton','String','test','Position',[posbutton height-115,buttonwidth,lineheight],'Callback',{@testcal,obj});
obj.guihandles.addcam=uicontrol('Style','pushbutton','String','Add camera','Position',[posbutton height-140,buttonwidth,lineheight],'Callback',{@menu_callback,obj,'add'});

Expand Down Expand Up @@ -345,6 +345,14 @@ function cellselect(table,data,obj,tname)
X=num2str(X);
end
table.Data{data.Indices(1),7}=X;
if data.Indices(1)==15 %imagemetadata
oldentry=table.Data{15,3};
if ~isempty(oldentry)
oldentry=[oldentry ','];
end
newentry=[oldentry tag{1}];
table.Data{15,3}=newentry;
end
end
tables2prop(obj);
end
Expand Down Expand Up @@ -403,7 +411,7 @@ function cellselecth(t,d)
end


function loadimages(a,b,obj)
function loadimagesi(a,b,obj)
ph=obj.defaultpath;
if ~isempty(ph)
ph=[fileparts(ph) filesep];
Expand Down Expand Up @@ -536,7 +544,7 @@ function loadcamerafile(a,b,obj)
[f,p]=uigetfile(file);
if f
obj.cameraSettingsFile=[p f];
obj.guihandles.camerafile=[p f];
obj.guihandles.camerafile.String=[p f];
loadcameras(obj);
end

Expand Down

0 comments on commit de2b3e3

Please sign in to comment.