source: aedes_viewprocpar.m @ 115

Last change on this file since 115 was 80, checked in by tjniskan, 10 years ago
  • Changed the historical "an2_" prefix to "aedes_" in all files. NOTE:

Any script or function relying to Aedes functions will be broken
because of this. Just do a search/replace from "an2_" to "aedes_" in
your files and all should be well...

  • Changed the name of an2_readtab.m to a more informative

aedes_readphasetable.m

File size: 2.5 KB
Line 
1function aedes_viewprocpar(DATA)
2% AEDES_VIEWPROCPAR - VNMR Procpar-file viewer
3%   
4%
5% Synopsis:
6%
7% Description:
8%
9% Examples:
10%
11% See also:
12%
13
14% This function is a part of Aedes - A graphical tool for analyzing
15% medical images
16%
17% Copyright (C) 2006 Juha-Pekka Niskanen <Juha-Pekka.Niskanen@uku.fi>
18%
19% Department of Physics, Department of Neurobiology
20% University of Kuopio, FINLAND
21%
22% This program may be used under the terms of the GNU General Public
23% License version 2.0 as published by the Free Software Foundation
24% and appearing in the file LICENSE.TXT included in the packaging of
25% this program.
26%
27% This program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28% WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29
30
31
32%% Load default font and colors
33GD=aedes_gui_defaults;
34
35% Position figure to the center of the screen
36scrsz = get(0,'screensize');
37fig_w = 600;
38fig_h = 640;
39fig_pos = [scrsz(3)/2-fig_w/2 scrsz(4)/2-fig_h/2 fig_w fig_h];
40
41%% Main Figure ----------------------------
42fh = figure('Units','Pixel', ...
43            'position',fig_pos,...
44            'Name','Results viewer', ...
45            'Numbertitle','off', ...
46            'Tag','resview_fig', ...
47            'Color',GD.col.mainfig, ...
48            'Toolbar','none', ...
49            'Menubar','none', ...
50            'DoubleBuffer','on', ...
51            'DockControls','off',...
52            'renderer','painters',...
53            'Handlevisibility','off');
54
55
56restable = uitable('Parent',fh,'position',[10 10 fig_w-2*10 fig_h-2*10]);
57
58%% Read procpar and construct a cell array
59pp_cell = {};
60fldnames=fieldnames(DATA.PROCPAR);
61fldnames=sort(fldnames);
62for ii=1:length(fldnames)
63  pp_cell{end+1,1}=fldnames{ii};
64  val=DATA.PROCPAR.(fldnames{ii});
65  if length(val)>1
66    if iscell(val)
67      %pp_cell{end,2}=val{1};
68      str='{ ';
69      for ii=1:length(val)
70        val{ii}=strrep(val{ii},'''','''''');
71        str = [str,' ''',val{ii},''' '];
72        %pp_cell{end,1+ii}=val{ii};
73      end
74      str=[str,' }'];
75      pp_cell{end,2}=str;
76    else
77      %pp_cell{end,2}=val(1);
78      str='[ ';
79      for ii=1:length(val)
80        str=[str,' ',num2str(val(ii)),' '];
81        %pp_cell{end,1+ii}=val(ii);
82      end
83      str=[str,' ]'];
84      pp_cell{end,2}=str;
85    end
86  else
87    if iscell(val)
88      pp_cell{end,2}=val{1};
89    else
90      pp_cell{end,2}=val;
91    end
92  end
93end
94
95sz=size(pp_cell);
96
97set(restable,'NumRows',sz(1),...
98             'NumColumns',sz(2))
99drawnow
100drawnow
101set(restable,'Data',pp_cell)
102drawnow
103drawnow
104
Note: See TracBrowser for help on using the repository browser.

Powered by Trac 1.0.9.Copyright © Juha-Pekka Niskanen 2008