diff --git a/+interfaces/imageloaderSMAP.m b/+interfaces/imageloaderSMAP.m index 02e5fda7..580a9617 100644 --- a/+interfaces/imageloaderSMAP.m +++ b/+interfaces/imageloaderSMAP.m @@ -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 diff --git a/settings/cameras.mat b/settings/cameras.mat index 4f4fe2ef..26c97233 100644 Binary files a/settings/cameras.mat and b/settings/cameras.mat differ diff --git a/shared/imageloaders/CameraManager.m b/shared/imageloaders/CameraManager.m index c40b313c..83d1dc15 100644 --- a/shared/imageloaders/CameraManager.m +++ b/shared/imageloaders/CameraManager.m @@ -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'}); @@ -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 @@ -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]; @@ -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