classdef GiftIcaReport obj.Orientation=val; otherwise id = 'GiftIcaReport:set_orientation:invalid_orientation'; msg = sprintf('%s\n%s\n%s\t%s\t%s\n',... 'invalid option for orientation',... 'pick one of the following options',... obj.OrientationOptions{:}); %#ok throw(MException(id,msg)); end end function set.SliceNumbers(obj,val) if isnumeric(val) && ~any(val<1) obj.SliceNumbers=val; else id = 'GiftIcaReport:set_slicenumbers:invalid_input'; msg = sprintf('invalid input for slicenumbers'); throw(MException(id,msg)); end end end methods %private methods function out = setfile(~,val) if isempty(val) out={}; return end if strcmpi('ui',val) out={spm_select(1,'image','select ICA file, first frame')}; return end if iscell(val) if ~exist(val{1},'file') id='GiftICAReport:setfile:FileNotFound'; msg='File not Found'; throw(MException(id,msg)); else out=val(1); return end else if ~exist(val,'file') id='GiftICAReport:setfile:FileNotFound'; msg='File not Found'; throw(MException(id,msg)); else out={val}; return end end end end end