www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgcalinput/ATI_Vision.m

    function varargout = ATI_Vision(obj,opt)
%ATI_VISION Import from ATI Vision.
%
%  S = ATI_VISION(OBJ) imports from an ATI Vision session.
%
%  [FILTER, FILTERDESC, ISFILE] = ATI_VISION(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 = {'', 'ATI Vision', false};
        return
    else
        error(message('mbc:cgcalinput:InvalidArgument'))
    end
end        

% Get calibration interface
if isa(obj.filename, 'calibrationdata.visionv2interface')
    cal = obj.filename; % interface can be set via the filename property for automated testing
    ok = true;
else
    [cal, ok] = cgvisionv2interface;
end

% Abort if failed
if ok
    varargout{1} = pGuiConvertCalData(cal, true);
else
    varargout{1} = [];
end