Changeset 77 for an2_res2table.m


Ignore:
Timestamp:
Feb 5, 2009, 10:16:41 AM (10 years ago)
Author:
tjniskan
Message:
  • Fixed a strange bug related to resizing Aedes window in Matlab

R2008a (and possibly R2008b and R2009a).

  • Fixed bugs of Voxel TimeSeries? and Overlay Control figure

handles not being properly destroyed on exit.

  • Changed default values for reading VNMR files (now Fast Read is on

by default, output precision is single and data is oriented using
PROCPAR.orient)

  • Fixed a bug in the calculate SNR -plugin
  • Made a temporary workaround for controlling the output in the "View

ROI statistics" -table. A proper GUI implementation will (hopefully) follow
shortly. The output can be controlled by using Aedes preferences. For
example setpref('Aedes','StatPrintDirs?','TXYZV') will print in the
output Total, X-dir, Y-dir, Z-dir and V-dir statistics.

M an2_revision.m
M an2_data_read.m
M an2_resviewer.m
M aedes.m
M an2_res2table.m
M plugins/calculate_snr.m
M an2_readfid.m
M an2_readfidprefs.m
M an2_roi_stats.m

File:
1 edited

Legend:

Unmodified
Added
Removed
  • an2_res2table.m

    r53 r77  
    3535ResTable = {};
    3636ResFileName = '';
    37 dirs = [1 2 3]; % By default show all directions
     37dirs = [0 1 2 3 4]; % By default show all directions (1,2,3,4) and total (0)
    3838
    3939% Check Res-structure
     
    5757   case {'directions','dirs'}
    5858    tmp = varargin{ii+1};
    59     dirs = find(ismember('XYZ',tmp));
     59    dirs = find(ismember('TXYZV',tmp))-1;
    6060   otherwise
    6161    error('Unknown parameter %s',varargin{ii})
     
    7676      Res.Stat(ii).YD.Sum = NaN(1,length(Res.Stat(ii).YD.Mean));
    7777      Res.Stat(ii).ZD.Sum = NaN(1,length(Res.Stat(ii).ZD.Mean));
     78      Res.Stat(ii).VD.Sum = NaN(1,length(Res.Stat(ii).VD.Mean));
    7879    end
    7980  end
     
    150151
    151152    % Construct totals
    152     ResTable{5,1} = 'TOTAL';
    153     ResTable(6:7,:) = {'ROI','Mean','STD','Sum','Min','Max','Pixel count';...
    154                        '------','------','------','------',...
    155                        '------','------','------'};
    156     RowInd = 8;
    157     for kk=1:nRois
    158       totals = [Res.Stat(kk).Mean,Res.Stat(kk).Std,Res.Stat(kk).Sum,Res.Stat(kk).Min,...
    159                Res.Stat(kk).Max];
    160       ResTable{RowInd,1} = Res.Stat(kk).Label;
    161       ResTable(RowInd,2:6) = strrep(an2_cellsprintf(['%.' num2str(NumDec) 'f'],...
    162                                                   totals),'.',DecSep);
    163       ResTable(RowInd,7) =  strrep(an2_cellsprintf('%.0f',Res.Stat(kk).PixelCount),'.',...
    164                                      DecSep);
    165       RowInd=RowInd+1;
     153    if any(dirs==0)
     154      ResTable{5,1} = 'TOTAL';
     155      ResTable(6:7,:) = {'ROI','Mean','STD','Sum','Min','Max','Pixel count';...
     156        '------','------','------','------',...
     157        '------','------','------'};
     158      RowInd = 8;
     159      for kk=1:nRois
     160        totals = [Res.Stat(kk).Mean,Res.Stat(kk).Std,Res.Stat(kk).Sum,Res.Stat(kk).Min,...
     161          Res.Stat(kk).Max];
     162        ResTable{RowInd,1} = Res.Stat(kk).Label;
     163        ResTable(RowInd,2:6) = strrep(an2_cellsprintf(['%.' num2str(NumDec) 'f'],...
     164          totals),'.',DecSep);
     165        ResTable(RowInd,7) =  strrep(an2_cellsprintf('%.0f',Res.Stat(kk).PixelCount),'.',...
     166          DecSep);
     167        RowInd=RowInd+1;
     168      end
     169    else
     170      RowInd = 3;
    166171    end
    167172   
    168173    dir_str = {'X-Direction','XD';...
    169174               'Y-Direction','YD';...
    170                'Z-Direction','ZD'};
     175               'Z-Direction','ZD';...
     176               'V-Direction','VD'};
    171177   
    172178   
    173179    for kk=dirs
     180      if kk==0
     181        continue
     182      end
     183     
    174184      % Construct X, Y, and Z directions
    175185      RowInd = RowInd+2;
Note: See TracChangeset for help on using the changeset viewer.

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