IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
vis_sovalues_drawimage.m
Go to the documentation of this file.
1 %> @brief Draws image from a sovalues object
3  properties
4  %> ={[Inf, 0, 0], [1, 2]}
5  %> @sa sovalues.m
6  dimspec = {[Inf, 0, 0], [1, 2]};
7 
8  %> =rates
9  valuesfieldname = 'rates';
10 
11  %> =[]
12  clim = [];
13 
14  %> =0
15  flag_logtake = 0;
16 
17  %> =0
18  flag_transpose = 0;
19 
20  flag_star = 1;
21  end;
22 
23 
24  methods
25  %> Constructor
26  function o = vis_sovalues_drawimage()
27  o.classtitle = 'Image';
28  o.inputclass = 'sovalues';
29  end;
30  end;
31 
32 
33  methods(Access=protected)
34  function out = do_use(o, r)
35  out = [];
36 
37  p = plotter12();
38  [p.values, p.ax, axnot] = sovalues.get_vv_aa(r.values, r.ax, o.dimspec);
39 
40 
41  if ndims(p.values) ~= 2
42  irerror('dimspec is wrong, should select exactly 2 dimensions!');
43  end;
44 
45 
46  ch = r.chooser;
47  if o.flag_star && ~isempty(ch)
48  %> Finds the "best" (x, y) to put a star on the image
49  temp = ch.use(p.values);
50  star_ij= cell2mat(temp);
51  else
52  star_ij = [];
53  end;
54 
55  p.draw_image(o.valuesfieldname, star_ij, o.clim, o.flag_logtake, o.flag_transpose);
56 
57  % title
58  if numel(axnot) > 0
59  s = '';
60  for i = 1:numel(axnot)
61  if i > 1
62  s = cat(2, s, '; ');
63  end;
64  s = cat(2, s, axnot(i).label, ': ', axnot(i).ticks{1});
65  end;
66 
67  title(s);
68  end;
69  end;
70  end;
71 end
function irerror(in s)
Draws image from a sovalues object.
function draw_image(in Y, in height, in direction)
Visualization base class.
Definition: vis.m:4