0001 function image_levels(img, levels, clim )
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 warning('EIDORS:deprecated','IMAGE_LEVELS is deprecated as of 29-Mar-2015. ');
0015
0016 set(gcf,'NumberTitle','off');
0017 set(gcf,'Name', img.name);
0018 fwd_mdl= img.fwd_model;
0019 vtx= fwd_mdl.nodes;
0020 simp= fwd_mdl.elems;
0021 img_data = img.elem_data;
0022
0023
0024 if size(levels,1)==3
0025 ll = size(levels,2);
0026 img_cols = max(levels(2,:));
0027 img_rows = max(levels(3,:));
0028 else
0029 ll = length( levels );
0030 img_cols = ceil( sqrt( ll ));
0031 img_rows = ceil( ll/ img_cols );
0032 end
0033 subplot(img_rows,img_cols,1);
0034
0035
0036 fc = eidors_obj('get-cache', fwd_mdl, 'slicer_plot_fc');
0037 if ~isempty( fc )
0038 eidors_msg('image_levels: using cached value', 3);
0039 else
0040 [fc] = slicer_plot_n(levels(1),img_data,vtx,simp);
0041 eidors_obj('set-cache', fwd_mdl, 'slicer_plot_fc', fc);
0042 eidors_msg('image_levels: setting cached value', 3);
0043 end
0044
0045
0046 global eidors_colours;
0047 mpc= eidors_colours.mapped_colour;
0048 eidors_colours.mapped_colour = 128;
0049
0050 for idx= 1:length(levels);
0051 subplot(img_rows,img_cols,idx);
0052 lev= levels(idx);
0053 slicer_plot_n(lev,img_data,vtx,simp, fc);
0054 view(2);
0055 axis('off');
0056 if ~exist('OCTAVE_VERSION');
0057 axis equal
0058 end
0059 title(sprintf('z=%4.2f',lev));
0060 end
0061
0062
0063 eidors_colours.mapped_colour = mpc;