www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgcalinput/ATI_Vision_MAT_file.m
function varargout = ATI_Vision_MAT_file(obj,opt) %ATI_VISION_MAT_FILE Import from ATI Vision 2.x MAT file. % % S = ATI_VISION_MAT_FILE(OBJ) imports from an ATI Vision 2.x MAT file. % % [FILTER, FILTERDESC, ISFILE] = ATI_VISION_MAT_FILE(OBJ, 'getname') % returns a filter to use, a description of the type that can be used in a % an open file dialog, and a flag that indicates whether the importer % loads from file or an alternative source. % Copyright 2000-2011 The MathWorks, Inc. % Check inputs narginchk(1,2) if nargin == 2 if strcmpi(opt, 'getname') varargout = {'*.mat', 'Vision MAT-files (*.mat)', true}; return else error(message('mbc:cgcalinput:InvalidArgument')) end end pm = []; % Get calibration interface if isa(obj.filename, 'calibrationdata.visionv2matinterface') cal = obj.filename; % interface can be set via the filename property for automated testing ok = true; elseif ischar(obj.filename) cal = calibrationdata.visionv2matinterface; pm = cgcalgui.progressmanager('Job', 'Import Calibration Data'); cal.ProgressManager = pm; cal.Filename = obj.filename; ok = true; else [cal, ok] = cgvisionv2matinterface('r'); end % Abort if failed if ok varargout{1} = pGuiConvertCalData(cal, false, pm); else varargout{1} = []; end