Home > m > gui > ltpdv > callbacks > ltpdv_storeFilter.m

ltpdv_storeFilter

PURPOSE ^

LTPDV_STOREFILTER stores the current filter as an object in the object

SYNOPSIS ^

function ltpdv_storeFilter(varargin)

DESCRIPTION ^

 LTPDV_STOREFILTER stores the current filter as an object in the object
 list.

 M Hewitson 24-04-08

 $Id: ltpdv_storeFilter.m,v 1.1 2008/05/11 10:38:43 hewitson Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function ltpdv_storeFilter(varargin)
0002 % LTPDV_STOREFILTER stores the current filter as an object in the object
0003 % list.
0004 %
0005 % M Hewitson 24-04-08
0006 %
0007 % $Id: ltpdv_storeFilter.m,v 1.1 2008/05/11 10:38:43 hewitson Exp $
0008 %
0009 
0010 % Handles
0011 myh     = varargin{1};
0012 htab    = varargin{end-1};
0013 mainfig = varargin{end};
0014 
0015 filts = getappdata(mainfig, 'Filters');
0016 
0017 % Get selection
0018 fh = findobj(mainfig, 'Tag', 'LTPDVfilterList');
0019 idx = get(fh, 'Value');
0020 sfilts = [];
0021 for j=1:length(filts)
0022    if ismember(j, idx)
0023       sfilts = [sfilts filts(j)];
0024    end
0025 end
0026 
0027 % Add filter to the object list
0028 objs = getappdata(mainfig, 'LTPDAobjects');
0029 for j=1:length(sfilts)
0030    filt = sfilts(j);
0031    objs = [objs {filt}];
0032 end
0033 setappdata(mainfig, 'LTPDAobjects', objs);
0034 
0035 % Refresh object list
0036 ltpdv_refresh_object_list(mainfig);
0037 
0038 
0039 % END

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003