Changeset 80


Ignore:
Timestamp:
Feb 20, 2009, 3:06:07 PM (9 years ago)
Author:
tjniskan
Message:
  • 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

Files:
23 edited
43 moved

Legend:

Unmodified
Added
Removed
  • aedes.m

    r78 r80  
    3131%
    3232%      %% Example 3
    33 %      DATA=an2_data_read;      % Read various image data to a DATA-structure
     33%      DATA=aedes_data_read;      % Read various image data to a DATA-structure
    3434%      aedes(DATA)       % Open data in Aedes
    3535%
     
    4545%
    4646% See also:
    47 %      AN2_DATA_READ, AN2_READFID, AN2_RESVIEWER, AN2_JUIGETFILES
     47%      AEDES_DATA_READ, AEDES_READFID, AEDES_RESVIEWER, AEDES_JUIGETFILES
    4848
    4949% Aedes - A graphical tool for analyzing medical images
     
    8686try
    8787  if getpref('Aedes','AutoCheckUpdates')
    88         Dat=an2_update('semiprompt');
     88        Dat=aedes_update('semiprompt');
    8989        if Dat
    9090          return
     
    243243%%%%%%%%%%%%%%%%%%%%%%%%%%
    244244function l_CheckUpdates(h,evd)
    245   done = an2_update('prompt');
     245  done = aedes_update('prompt');
    246246end
    247247
     
    286286  DefaultColor=get(0,'DefaultUicontrolBackgroundcolor');
    287287end
    288 GD=an2_gui_defaults;
     288GD=aedes_gui_defaults;
    289289GD.col.frame = DefaultColor;
    290290% Get screen size
     
    532532                 'enable','on');
    533533vnmredit_h = uimenu(tools_h,'Label','Edit VNMR defaults', ...
    534                    'callback','an2_readfidprefs',...
     534                   'callback','aedes_readfidprefs',...
    535535                   'enable','on');
    536536resview_h = uimenu(tools_h,'Label','Results Viewer', ...
    537                    'callback','an2_resviewer',...
     537                   'callback','aedes_resviewer',...
    538538                   'enable','on',...
    539539                   'separator','on');
     
    708708                      'callback','eval(get(gcbo,''userdata''))');
    709709set(help_about_h,'userdata',...
    710                  'an2_helpabout');
     710                 'aedes_helpabout');
    711711
    712712
     
    722722
    723723%% load CData for buttons
    724 btn_cdata = load('an2_cdata.mat');
     724btn_cdata = load('aedes_cdata.mat');
    725725H.btn_cdata = btn_cdata;
    726726%tmp=NaN(18,20,3);
     
    19751975if ShowPluginError
    19761976  errordlg(['Error: Could not initialize plugins menu. Please, check the ' ...
    1977             'file "an2_plugins.m".'],'Error initializing plugins','modal');
     1977            'file "aedes_plugins.m".'],'Error initializing plugins','modal');
    19781978end
    19791979
     
    20102010        filepath='';
    20112011  end
    2012   [filefilt,dataformats] = an2_getfilefilter;
     2012  [filefilt,dataformats] = aedes_getfilefilter;
    20132013 
    20142014  % Ask for a file
     
    20212021        end
    20222022  else
    2023         [f_name, f_path, f_index] = an2_juigetfiles( ...
     2023        [f_name, f_path, f_index] = aedes_juigetfiles( ...
    20242024          filefilt, ...
    20252025          'Select data file(s)',filepath);
     
    21092109if strcmpi(opt,'single') || length(f_name)==1
    21102110  try
    2111         DATA=an2_data_read([f_path{1},f_name{1}]);
     2111        DATA=aedes_data_read([f_path{1},f_name{1}]);
    21122112  catch
    21132113        h=errordlg({['Could not read file "',[f_path{1},f_name{1}],'"'],'',lasterr},...
     
    21232123  count=0;
    21242124  SkippedFiles={};
    2125   [h,txh]=an2_calc_wait({['Reading file 1/',...
     2125  [h,txh]=aedes_calc_wait({['Reading file 1/',...
    21262126        num2str(length(f_name))],'""'});
    21272127  for ii=1:length(f_name)
     
    21312131        drawnow
    21322132        try
    2133           tmp=an2_data_read([f_path{ii},f_name{ii}],'wbar','off');
     2133          tmp=aedes_data_read([f_path{ii},f_name{ii}],'wbar','off');
    21342134         
    21352135          % Determine from the first file if we are reading one slice data into
     
    22712271
    22722272catch
    2273   an2_errordump(lasterror);
     2273  aedes_errordump(lasterror);
    22742274end
    22752275end % function l_OpenFile(h,
     
    24152415   
    24162416    % Check if files exist
    2417     ind=an2_check_file_exist(filenames,fpath);
     2417    ind=aedes_check_file_exist(filenames,fpath);
    24182418    if any(ind)
    24192419      % Warn if some files are about to be overwritten
     
    24382438    if strcmpi(fileType,'MRI')
    24392439      done=true;
    2440       h=an2_wbar(0,sprintf('Saving slice 1/%d in MRI format...',nFiles));
     2440      h=aedes_wbar(0,sprintf('Saving slice 1/%d in MRI format...',nFiles));
    24412441      for ii=1:nFiles
    2442         an2_wbar(ii/nFiles,h,sprintf('Saving slice %d/%d in MRI format...',ii, ...
     2442        aedes_wbar(ii/nFiles,h,sprintf('Saving slice %d/%d in MRI format...',ii, ...
    24432443                                 nFiles))
    24442444        try
    2445                   an2_smiswrite(DATA{Dat.DataInd}.FTDATA(:,:,ii),...
     2445                  aedes_smiswrite(DATA{Dat.DataInd}.FTDATA(:,:,ii),...
    24462446                        [fpath,filenames{ii}])
    24472447        catch
     
    24522452     
    24532453    elseif strcmpi(fileType,'NIfTI')
    2454       h=an2_wbar(0,sprintf('Saving slice 1/%d in NIfTI format...',nFiles));
     2454      h=aedes_wbar(0,sprintf('Saving slice 1/%d in NIfTI format...',nFiles));
    24552455      for ii=1:nFiles
    2456         an2_wbar(ii/nFiles,h,sprintf('Saving slice %d/%d in NIfTI format...',ii, ...
     2456        aedes_wbar(ii/nFiles,h,sprintf('Saving slice %d/%d in NIfTI format...',ii, ...
    24572457                                 nFiles))
    2458         [done,msg]=an2_write_nifti(DATA{Dat.DataInd}.FTDATA(:,:,ii),...
     2458        [done,msg]=aedes_write_nifti(DATA{Dat.DataInd}.FTDATA(:,:,ii),...
    24592459                               [fpath,filenames{ii}],'DataType','single',...
    24602460                               'FileType',2,'Clim',Dat.SliceClim(Dat.DataInd,:));
     
    24622462     
    24632463    elseif  strcmpi(fileType,'Analyze 7.5')
    2464       h=an2_wbar(0,sprintf('Saving slice 1/%d in Analyze 7.5 format...',nFiles));
     2464      h=aedes_wbar(0,sprintf('Saving slice 1/%d in Analyze 7.5 format...',nFiles));
    24652465      for ii=1:nFiles
    2466         an2_wbar(ii/nFiles,h,sprintf('Saving slice %d/%d in Analyze 7.5 format...',ii, ...
     2466        aedes_wbar(ii/nFiles,h,sprintf('Saving slice %d/%d in Analyze 7.5 format...',ii, ...
    24672467                                 nFiles))
    2468         [done,msg]=an2_write_nifti(DATA{Dat.DataInd}.FTDATA(:,:,ii),...
     2468        [done,msg]=aedes_write_nifti(DATA{Dat.DataInd}.FTDATA(:,:,ii),...
    24692469                               [fpath,filenames{ii}],'DataType','single',...
    24702470                               'FileType',0,'Clim',Dat.SliceClim(Dat.DataInd,:));
     
    24742474  else
    24752475    if strcmpi(fileType,'NIfTI')
    2476       [h,txh]=an2_calc_wait('Saving image data in NIfTI format...');
    2477       [done,msg]=an2_write_nifti(DATA{Dat.DataInd}.FTDATA,...
     2476      [h,txh]=aedes_calc_wait('Saving image data in NIfTI format...');
     2477      [done,msg]=aedes_write_nifti(DATA{Dat.DataInd}.FTDATA,...
    24782478                             [fpath,fname],'filetype',2,...
    24792479                             'Clim',Dat.SliceClim(Dat.DataInd,:));
    24802480    elseif  strcmpi(fileType,'Analyze 7.5')
    2481       [h,txh]=an2_calc_wait('Saving image data in Analyze 7.5 format...');
    2482       [done,msg]=an2_write_nifti(DATA{Dat.DataInd}.FTDATA,...
     2481      [h,txh]=aedes_calc_wait('Saving image data in Analyze 7.5 format...');
     2482      [done,msg]=aedes_write_nifti(DATA{Dat.DataInd}.FTDATA,...
    24832483                             [fpath,fname],'filetype',0,...
    24842484                             'Clim',Dat.SliceClim(Dat.DataInd,:));
     
    25842584          all(Dat.ImageDim(:,2)/Dat.ImageDim(1,2))
    25852585       
    2586         [calc_h,txh]=an2_calc_wait({'Writing image data to file',
     2586        [calc_h,txh]=aedes_calc_wait({'Writing image data to file',
    25872587                            [fpath,fprefix,fext]});
    25882588       
     
    25962596       
    25972597        % Write data to NIfTI/Analyze75-file
    2598         [done,msg]=an2_write_nifti(data_mtx,[fpath,fprefix,fext],...
     2598        [done,msg]=aedes_write_nifti(data_mtx,[fpath,fprefix,fext],...
    25992599                               'FileType',fileType,'DataType', ...
    26002600                               'single');
     
    26242624     
    26252625      % Check if files exist
    2626       ind=an2_check_file_exist(filenames,fpath);
     2626      ind=aedes_check_file_exist(filenames,fpath);
    26272627      if any(ind)
    26282628        % Warn if some files are about to be overwritten
     
    26452645      end
    26462646     
    2647       h=an2_wbar(0,sprintf('Saving slice 1/%d in NIfTI format...',nFiles));
     2647      h=aedes_wbar(0,sprintf('Saving slice 1/%d in NIfTI format...',nFiles));
    26482648      for ii=1:nFiles
    2649         an2_wbar(ii/nFiles,h,sprintf('Saving slice %d/%d in NIfTI format...',ii, ...
     2649        aedes_wbar(ii/nFiles,h,sprintf('Saving slice %d/%d in NIfTI format...',ii, ...
    26502650                                 nFiles))
    2651         [done,msg]=an2_write_nifti(DATA{ii}.FTDATA,...
     2651        [done,msg]=aedes_write_nifti(DATA{ii}.FTDATA,...
    26522652                               [fpath,filenames{ii}],'DataType','single',...
    26532653                               'FileType',2,...
     
    26682668
    26692669catch
    2670   an2_errordump(lasterror);
     2670  aedes_errordump(lasterror);
    26712671end
    26722672end % function l_SaveImageData(h,
     
    28492849
    28502850catch
    2851   an2_errordump(lasterror);
     2851  aedes_errordump(lasterror);
    28522852end
    28532853end % function l_CloseFile(h,
     
    34023402
    34033403catch
    3404   an2_errordump(lasterror);
     3404  aedes_errordump(lasterror);
    34053405end
    34063406end % function l_Initialize(h,
     
    35393539
    35403540catch
    3541   an2_errordump(lasterror);
     3541  aedes_errordump(lasterror);
    35423542end
    35433543end % function l_DisplayData(h,
     
    35523552
    35533553% Call stack editor GUI
    3554 [filelist,rem_ind,add_ind,sort_ind] = an2_editstack(DATA);
     3554[filelist,rem_ind,add_ind,sort_ind] = aedes_editstack(DATA);
    35553555if isempty(filelist)
    35563556  return
     
    35813581skippedFiles={};
    35823582if any(add_ind)
    3583   [hCalcWait,txt_h] = an2_calc_wait('Reading new data files...');
     3583  [hCalcWait,txt_h] = aedes_calc_wait('Reading new data files...');
    35843584  ind=find(add_ind);
    35853585  for ii=ind
    3586     data=an2_data_read(filelist{ii});
     3586    data=aedes_data_read(filelist{ii});
    35873587    if isempty(data)
    35883588      fprintf(1,'Could not read data file "%s". Skipping file...\n',filelist{ii})
     
    36033603  SliceClim(empty_ind,:)=[];
    36043604 
    3605   % Remove an2_calc_wait
     3605  % Remove aedes_calc_wait
    36063606  delete(hCalcWait)
    36073607end
     
    36903690
    36913691catch
    3692   an2_errordump(lasterror);
     3692  aedes_errordump(lasterror);
    36933693end
    36943694end % function l_EditImageStack(h,
     
    40104010
    40114011catch
    4012   an2_errordump(lasterror);
     4012  aedes_errordump(lasterror);
    40134013end
    40144014end % function l_UpdateImageOverlay(h,
     
    40404040  % Read data
    40414041  try
    4042     tmp_data=an2_data_read([],'default_dir',default_dir);
     4042    tmp_data=aedes_data_read([],'default_dir',default_dir);
    40434043  catch
    40444044    h=errordlg({'Error loading image overlay!','',lasterr},...
     
    42734273
    42744274catch
    4275   an2_errordump(lasterror);
     4275  aedes_errordump(lasterror);
    42764276end
    42774277end % function l_LoadImageOverlay(h,
     
    42954295  %% Load default font and colors
    42964296  FigColor=get(0,'DefaultUicontrolBackgroundcolor');
    4297   GD=an2_gui_defaults;
     4297  GD=aedes_gui_defaults;
    42984298 
    42994299  % Overlay controls figure
     
    45264526 
    45274527catch
    4528   an2_errordump(lasterror);
     4528  aedes_errordump(lasterror);
    45294529end
    45304530%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    46844684 
    46854685  catch
    4686         an2_errordump(lasterror);
     4686        aedes_errordump(lasterror);
    46874687  end
    46884688  end % function l_OverlayControlCB(h,
     
    48044804
    48054805catch
    4806   an2_errordump(lasterror);
     4806  aedes_errordump(lasterror);
    48074807end
    48084808end % function l_UpdateInfoText(h,
     
    48674867
    48684868catch
    4869   an2_errordump(lasterror);
     4869  aedes_errordump(lasterror);
    48704870end
    48714871end % function l_UpdateRoiInfoText(h,
     
    48924892
    48934893catch
    4894   an2_errordump(lasterror);
     4894  aedes_errordump(lasterror);
    48954895end
    48964896end % function l_InfoTextBackground(h,
     
    49244924
    49254925catch
    4926   an2_errordump(lasterror);
     4926  aedes_errordump(lasterror);
    49274927end
    49284928end % function l_ShowColorbar(h,
     
    51135113
    51145114catch
    5115   an2_errordump(lasterror);
     5115  aedes_errordump(lasterror);
    51165116end
    51175117end % function l_AxesPositions(h,
     
    52565256
    52575257catch
    5258   an2_errordump(lasterror);
     5258  aedes_errordump(lasterror);
    52595259end
    52605260end % function axpos=l_axpos(ax_ind,
     
    54365436
    54375437catch
    5438   an2_errordump(lasterror);
     5438  aedes_errordump(lasterror);
    54395439end
    54405440end % function l_ChangeSlice(h,
     
    54565456
    54575457catch
    5458   an2_errordump(lasterror);
     5458  aedes_errordump(lasterror);
    54595459end
    54605460end % function l_WindowButtonUpFcn(h,
     
    55405540
    55415541catch
    5542   an2_errordump(lasterror);
     5542  aedes_errordump(lasterror);
    55435543end
    55445544end % function l_ChangeSliderOrient(h,
     
    55825582
    55835583catch
    5584   an2_errordump(lasterror);
     5584  aedes_errordump(lasterror);
    55855585end
    55865586end % function l_ChangeVolume(h,
     
    56595659
    56605660catch
    5661   an2_errordump(lasterror);
     5661  aedes_errordump(lasterror);
    56625662end
    56635663end % function l_ChangeView(h,
     
    57495749 
    57505750  catch
    5751     an2_errordump(lasterror);
     5751    aedes_errordump(lasterror);
    57525752  end
    57535753  end % function l_ViewAxesUnits(h,
     
    58385838  baseline = mean(tsdata(1:20));
    58395839  tsdata = (tsdata./baseline-1)*100;
    5840   tt=an2_trendest(tsdata,10);
     5840  tt=aedes_trendest(tsdata,10);
    58415841  tt=tt(:).';
    58425842end
     
    59325932
    59335933catch
    5934   an2_errordump(lasterror);
     5934  aedes_errordump(lasterror);
    59355935end
    59365936
     
    59805980
    59815981catch
    5982   an2_errordump(lasterror);
     5982  aedes_errordump(lasterror);
    59835983end
    59845984end % function l_quit(h,
     
    60596059
    60606060catch
    6061   an2_errordump(lasterror);
     6061  aedes_errordump(lasterror);
    60626062end
    60636063end % function l_ShowHideCrossbars(h,
     
    61336133
    61346134catch
    6135   an2_errordump(lasterror);
     6135  aedes_errordump(lasterror);
    61366136end
    61376137end % function l_UpdateIntensityValue(h,
     
    62006200
    62016201catch
    6202   an2_errordump(lasterror);
     6202  aedes_errordump(lasterror);
    62036203end
    62046204end % function l_ResizeFcn(h,
     
    63216321
    63226322catch
    6323   an2_errordump(lasterror);
     6323  aedes_errordump(lasterror);
    63246324end
    63256325end % function l_SetImageSliders(h,
     
    63586358
    63596359catch
    6360   an2_errordump(lasterror);
     6360  aedes_errordump(lasterror);
    63616361end
    63626362end % function l_DragView(h,
     
    64986498
    64996499catch
    6500   an2_errordump(lasterror);
     6500  aedes_errordump(lasterror);
    65016501end
    65026502end % function l_Zoom(h,
     
    65486548    if Dat.DataRotation(ii)~=0
    65496549      rot=abs(Dat.DataRotation(ii)-4);
    6550       isRotEven = an2_iseven(rot);
     6550      isRotEven = aedes_iseven(rot);
    65516551     
    65526552      if ~isRotEven && Dat.DataFlip(ii)~=0
     
    65996599
    66006600  % Rotate/Flip Custom
    6601   Out = an2_rotateflip(DATA,squareImages);
     6601  Out = aedes_rotateflip(DATA,squareImages);
    66026602  if isempty(Out)
    66036603    return
     
    67646764  % Rotate DATA
    67656765  DATA{Dat.DataInd}.FTDATA = ...
    6766         an2_rot3d(DATA{Dat.DataInd}.FTDATA,k,dim);
     6766        aedes_rot3d(DATA{Dat.DataInd}.FTDATA,k,dim);
    67676767 
    67686768  % Rotate ROI
     
    67706770        for ii=1:length(ROI)
    67716771          ROI(ii).voxels{Dat.DataInd} = ...
    6772                 an2_rot3d(ROI(ii).voxels{Dat.DataInd},k,dim);
     6772                aedes_rot3d(ROI(ii).voxels{Dat.DataInd},k,dim);
    67736773        end
    67746774  end
     
    68926892
    68936893catch
    6894   an2_errordump(lasterror);
     6894  aedes_errordump(lasterror);
    68956895end
    68966896end % function l_Rotate(h,
     
    69316931
    69326932catch
    6933   an2_errordump(lasterror);
     6933  aedes_errordump(lasterror);
    69346934end
    69356935end % function l_ChangeColorbarLimits(h,
     
    69846984 
    69856985  catch
    6986     an2_errordump(lasterror);
     6986    aedes_errordump(lasterror);
    69876987  end
    69886988  end % function l_ChangeClim(h,
     
    70127012
    70137013catch
    7014   an2_errordump(lasterror);
     7014  aedes_errordump(lasterror);
    70157015end
    70167016end
     
    70667066
    70677067catch
    7068   an2_errordump(lasterror);
     7068  aedes_errordump(lasterror);
    70697069end
    70707070end
     
    72457245
    72467246catch
    7247   an2_errordump(lasterror);
     7247  aedes_errordump(lasterror);
    72487248end
    72497249end % function l_SetContrastBrightnessGamma(h,
     
    72937293
    72947294catch
    7295   an2_errordump(lasterror);
     7295  aedes_errordump(lasterror);
    72967296end
    72977297end % function l_SetAutoContrast(h,
     
    73897389 
    73907390catch
    7391   an2_errordump(lasterror);
     7391  aedes_errordump(lasterror);
    73927392end
    73937393end % function l_ColormapInvert(h,
     
    74197419
    74207420catch
    7421   an2_errordump(lasterror);
     7421  aedes_errordump(lasterror);
    74227422end
    74237423end % function l_ResetContrast(h,
     
    75357535
    75367536catch
    7537   an2_errordump(lasterror);
     7537  aedes_errordump(lasterror);
    75387538end
    75397539end % function l_DrawRemoveRoi(h,
     
    75597559done=false;
    75607560while ~done
    7561   resp=an2_inputdlg('Please give a descriptive label for the ROI','ROI Label?', ...
     7561  resp=aedes_inputdlg('Please give a descriptive label for the ROI','ROI Label?', ...
    75627562                    ['ROI ' num2str(length(ROI)+1)]);
    75637563  if isempty(resp)
     
    77127712
    77137713catch
    7714   an2_errordump(lasterror);
     7714  aedes_errordump(lasterror);
    77157715end
    77167716end % function l_RoiAdd(h,
     
    78217821
    78227822catch
    7823   an2_errordump(lasterror);
     7823  aedes_errordump(lasterror);
    78247824end
    78257825end % function l_RoiDelete(h,
     
    79137913
    79147914catch
    7915   an2_errordump(lasterror);
     7915  aedes_errordump(lasterror);
    79167916end
    79177917end % function l_RoiFill(h,
     
    79527952
    79537953catch
    7954   an2_errordump(lasterror);
     7954  aedes_errordump(lasterror);
    79557955end
    79567956end % function l_RoiView(h,
     
    80138013
    80148014catch
    8015   an2_errordump(lasterror);
     8015  aedes_errordump(lasterror);
    80168016end
    80178017end % function l_RoiUndo(h,
     
    82308230
    82318231catch
    8232   an2_errordump(lasterror);
     8232  aedes_errordump(lasterror);
    82338233end
    82348234end % function l_MoveRoi(h,
     
    82418241 
    82428242roi_ind = get(H.ROI_EDIT,'value');
    8243 [slice_ind,dir_ind,roilabel,copytype]=an2_roi_copy_gui(ROI,roi_ind);
     8243[slice_ind,dir_ind,roilabel,copytype]=aedes_roi_copy_gui(ROI,roi_ind);
    82448244
    82458245if isempty(slice_ind)
     
    82478247  return
    82488248end
    8249 [h,txh]=an2_calc_wait('Copying ROI(s)...');
     8249[h,txh]=aedes_calc_wait('Copying ROI(s)...');
    82508250
    82518251for ii=1:length(roilabel)
    82528252  % Add current ROI to undo buffer
    82538253  l_RoiUndoBuffer('add_indices',find(strcmp({ROI(:).label},roilabel{ii})),[]);
    8254   ROI = an2_copy_roi(ROI,roilabel{ii},dir_ind,slice_ind,Dat.CurrentVol, ...
     8254  ROI = aedes_copy_roi(ROI,roilabel{ii},dir_ind,slice_ind,Dat.CurrentVol, ...
    82558255                 Dat.DataInd,copytype);
    82568256end
     
    82678267
    82688268catch
    8269   an2_errordump(lasterror);
     8269  aedes_errordump(lasterror);
    82708270end
    82718271end % function l_RoiCopy(h,
     
    83498349      end
    83508350    end
    8351     [done,msg]=an2_saveres(tmp_data,tmp_roi,savefilename,'SaveType','roi',...
     8351    [done,msg]=aedes_saveres(tmp_data,tmp_roi,savefilename,'SaveType','roi',...
    83528352                       'waitbar',true);
    83538353  else
     
    83578357          rotateflip = Dat.RotateFlip3d;
    83588358        end
    8359     [done,msg]=an2_saveres(DATA,ROI,savefilename,'SaveType','roi',...
     8359    [done,msg]=aedes_saveres(DATA,ROI,savefilename,'SaveType','roi',...
    83608360                       'waitbar',true,'rotateflip',rotateflip);
    83618361  end
     
    83818381
    83828382catch
    8383   an2_errordump(lasterror);
     8383  aedes_errordump(lasterror);
    83848384end
    83858385end % function l_RoiSave(h,
     
    84418441        end
    84428442
    8443         % Show an2_calc_wait
    8444         [hCalcWait,txh]=an2_calc_wait({'Loading ROI(s) from',['"',f_path,f_name,'"']});
     8443        % Show aedes_calc_wait
     8444        [hCalcWait,txh]=aedes_calc_wait({'Loading ROI(s) from',['"',f_path,f_name,'"']});
    84458445
    84468446        % Store new directory in preferences
     
    88068806      l_RefreshRoi;
    88078807
    8808       % Check if an2_calc_wait window still exists
     8808      % Check if aedes_calc_wait window still exists
    88098809      if ~isempty(hCalcWait) && ishandle(hCalcWait)
    88108810        delete(hCalcWait)
     
    88168816
    88178817    catch
    8818       an2_errordump(lasterror);
     8818      aedes_errordump(lasterror);
    88198819    end
    88208820  end % function l_RoiLoad()
     
    88278827 
    88288828% Calculate results
    8829 Res = an2_roi_stats(DATA,ROI);
     8829Res = aedes_roi_stats(DATA,ROI);
    88308830if isempty(Res)
    88318831  h=errordlg('Unknown error: Statistics calculation failed!',...
     
    88348834end
    88358835
    8836 % Open results in an2_resviewer
    8837 an2_resviewer(Res)
     8836% Open results in aedes_resviewer
     8837aedes_resviewer(Res)
    88388838
    88398839catch
    8840   an2_errordump(lasterror);
     8840  aedes_errordump(lasterror);
    88418841end
    88428842end % function l_RoiViewStats(h,
     
    88808880
    88818881catch
    8882   an2_errordump(lasterror);
     8882  aedes_errordump(lasterror);
    88838883end
    88848884end % function l_RoiRotateFlip(h,
     
    88988898
    88998899%% Load default font and colors
    8900 GD=an2_gui_defaults;
     8900GD=aedes_gui_defaults;
    89018901
    89028902% ROI Labels
     
    90339033
    90349034catch
    9035   an2_errordump(lasterror);
     9035  aedes_errordump(lasterror);
    90369036end
    90379037end % function l_RoiComparisons(h,
     
    90569056  done=false;
    90579057  while ~done
    9058     new_label=an2_inputdlg('Give a new label for the ROI','New ROI Label?', ...
     9058    new_label=aedes_inputdlg('Give a new label for the ROI','New ROI Label?', ...
    90599059                           roilabel);
    90609060    if isempty(new_label)
     
    91049104 
    91059105catch
    9106   an2_errordump(lasterror);
     9106  aedes_errordump(lasterror);
    91079107end
    91089108end % function l_RoiRename(h,
     
    91259125
    91269126catch
    9127   an2_errordump(lasterror);
     9127  aedes_errordump(lasterror);
    91289128end
    91299129end % function l_UiRoiEdgesCB(h,
     
    92329232 
    92339233catch
    9234   an2_errordump(lasterror);
     9234  aedes_errordump(lasterror);
    92359235end
    92369236end % function l_ShowRoiEdges(h,
     
    93459345
    93469346catch
    9347   an2_errordump(lasterror);
     9347  aedes_errordump(lasterror);
    93489348end
    93499349end % function l_RefreshRoi(H,
     
    93879387
    93889388catch
    9389   an2_errordump(lasterror);
     9389  aedes_errordump(lasterror);
    93909390end
    93919391end % function l_SetRoiTransparency(h,
     
    96339633
    96349634catch
    9635   an2_errordump(lasterror);
     9635  aedes_errordump(lasterror);
    96369636end
    96379637end % function l_SetMouseGestures(h,
     
    97609760
    97619761catch
    9762   an2_errordump(lasterror);
     9762  aedes_errordump(lasterror);
    97639763end
    97649764end % function l_RoiUndoBuffer(opt,
     
    98429842
    98439843catch
    9844   an2_errordump(lasterror);
     9844  aedes_errordump(lasterror);
    98459845end
    98469846end % function l_ChangeColormap(h,
     
    98869886end
    98879887
    9888 an2_export_gui(DATA,ROI,clim,Dat.ColMap,Dat.RoiTransp,Dat.ShowRoiEdges,overlay)
     9888aedes_export_gui(DATA,ROI,clim,Dat.ColMap,Dat.RoiTransp,Dat.ShowRoiEdges,overlay)
    98899889
    98909890catch
    9891   an2_errordump(lasterror);
     9891  aedes_errordump(lasterror);
    98929892end
    98939893end % function l_ExportImages(h,
     
    99369936
    99379937catch
    9938   an2_errordump(lasterror);
     9938  aedes_errordump(lasterror);
    99399939end
    99409940end % function l_UnfoldData(h,
     
    1005910059
    1006010060catch
    10061   an2_errordump(lasterror);
     10061  aedes_errordump(lasterror);
    1006210062end
    1006310063end % function l_KeyPressFcn(h,
     
    1012510125        rotateflip = Dat.RotateFlip3d;
    1012610126  end
    10127   [done,msg]=an2_saveres(DATA,ROI,filename,'SaveType',filetype,...
     10127  [done,msg]=aedes_saveres(DATA,ROI,filename,'SaveType',filetype,...
    1012810128                     'waitbar',true,'rotateflip',rotateflip);
    1012910129  if ~done && iscell(msg)
     
    1014510145
    1014610146catch
    10147   an2_errordump(lasterror);
     10147  aedes_errordump(lasterror);
    1014810148end
    1014910149end % function l_SaveResults(h,
     
    1027010270
    1027110271catch
    10272   an2_errordump(lasterror);
     10272  aedes_errordump(lasterror);
    1027310273end
    1027410274end % function l_ExecutePlugin(h,
  • aedes_calc_wait.m

    r78 r80  
    1 function [h,txh] = an2_calc_wait(str)
    2 % AN2_CALC_WAIT - Wait message box
     1function [h,txh] = aedes_calc_wait(str)
     2% AEDES_CALC_WAIT - Wait message box
    33%
    44% Synopsis:
    5 %       [h,txh] = an2_calc_wait(str)
     5%       [h,txh] = aedes_calc_wait(str)
    66%
    77% Description:
     
    1010%
    1111% Examples:
    12 %       [h,txh] = an2_calc_wait('Demo');
     12%       [h,txh] = aedes_calc_wait('Demo');
    1313%       pause(1)
    1414%       set(txh,'String','Almost ready.');
     
    1717%
    1818% See also:
    19 %       AN2_WBAR, AEDES
     19%       AEDES_WBAR, AEDES
    2020
    2121% This function is a part of Aedes - A graphical tool for analyzing
  • aedes_cellsprintf.m

    r78 r80  
    1 function C = an2_cellsprintf(form_str,s)
    2 % AN2_CELLSPRINTF - CELLSTR with SPRINTF formalism
     1function C = aedes_cellsprintf(form_str,s)
     2% AEDES_CELLSPRINTF - CELLSTR with SPRINTF formalism
    33%   
    44%
  • aedes_cellwrite.m

    r78 r80  
    1 function [done,msg] = an2_cellwrite(incell,filename,varargin)
    2 % AN2_CELLWRITE - Write cell array to a text file
     1function [done,msg] = aedes_cellwrite(incell,filename,varargin)
     2% AEDES_CELLWRITE - Write cell array to a text file
    33%   
    44%
    55% Synopsis:
    6 %        [done,msg] = an2_cellwrite(incell,filename,varargin)
     6%        [done,msg] = aedes_cellwrite(incell,filename,varargin)
    77%
    88% Description:
  • aedes_check_file_exist.m

    r78 r80  
    1 function ind = an2_check_file_exist(fnames,fpath)
    2 % AN2_CHECK_FILE_EXIST - Check if files exist in a specified directory
     1function ind = aedes_check_file_exist(fnames,fpath)
     2% AEDES_CHECK_FILE_EXIST - Check if files exist in a specified directory
    33%   
    44%
  • aedes_check_updates.m

    r78 r80  
    1 function [isUpdateAvailable,HeadRev,WorkingCopyRev,error_msg]=an2_check_updates()
    2 % AN2_CHECK_UPDATES - Check if Aedes updates are available
     1function [isUpdateAvailable,HeadRev,WorkingCopyRev,error_msg]=aedes_check_updates()
     2% AEDES_CHECK_UPDATES - Check if Aedes updates are available
    33%
    44% Synopsis:
    5 %       [isUpdateAvailable,HeadRev,WorkingCopyRev] = an2_check_updates()
     5%       [isUpdateAvailable,HeadRev,WorkingCopyRev] = aedes_check_updates()
    66%
    77% Description:
     
    1616%
    1717% See also:
    18 %       AEDES, AN2_UPDATE
     18%       AEDES, AEDES_UPDATE
    1919
    2020% This function is a part of Aedes - A graphical tool for analyzing
     
    4141
    4242% Get current revision and repository URL
    43 [rev,repo,workingcopy] = an2_revision;
     43[rev,repo,workingcopy] = aedes_revision;
    4444if isempty(repo)
    4545  WorkingCopyRev = rev;
  • aedes_copy_roi.m

    r78 r80  
    1 function ROI = an2_copy_roi(ROI,roi_label,dir_ind,slice_ind,vol_ind,data_ind,copytype)
    2 % AN2_COPY_ROI - Copy ROI in X, Y, or Z direction
     1function ROI = aedes_copy_roi(ROI,roi_label,dir_ind,slice_ind,vol_ind,data_ind,copytype)
     2% AEDES_COPY_ROI - Copy ROI in X, Y, or Z direction
    33%   
    44%
  • aedes_data_read.m

    r78 r80  
    1 function DATA = an2_data_read(filename,varargin)
    2 % AN2_DATA_READ - Read various image data formats to data structure
     1function DATA = aedes_data_read(filename,varargin)
     2% AEDES_DATA_READ - Read various image data formats to data structure
    33%   
    44%
    55% Synopsis:
    6 %       DATA=an2_data_read(filename,file_format,default_dir,varargin)
     6%       DATA=aedes_data_read(filename,file_format,default_dir,varargin)
    77%       
    88%       or
    99%
    10 %       DATA=an2_data_read;  % (interactive mode, opens a file dialog)
     10%       DATA=aedes_data_read;  % (interactive mode, opens a file dialog)
    1111%
    1212% Description:
     
    2626%
    2727% Examples:
    28 %       DATA=an2_data_read;   % Read image data
     28%       DATA=aedes_data_read;   % Read image data
    2929%       aedes(DATA)    % Open data in Aedes
    3030%
    3131% See also:
    32 %       AN2_READFID, AN2_READCTDATA, AN2_READ_NIFTI, AEDES
     32%       AEDES_READFID, AEDES_READCTDATA, AEDES_READ_NIFTI, AEDES
    3333
    3434% This function is a part of Aedes - A graphical tool for analyzing
     
    7272  %  ddir = [pwd,filesep];
    7373  %end
    74   [filefilt,dataformats] = an2_getfilefilter;
     74  [filefilt,dataformats] = aedes_getfilefilter;
    7575  [f_name, f_path, f_index] = uigetfile(...
    7676        filefilt, ...
     
    8282  end
    8383  filename = fullfile(f_path,f_name);
    84   dataformat = an2_getdataformat(filename);
     84  dataformat = aedes_getdataformat(filename);
    8585 
    8686elseif nargin>=1
     
    8989    f_path=[f_path,filesep];
    9090        f_name = [f_name,f_ext];
    91         dataformat = an2_getdataformat(filename);
     91        dataformat = aedes_getdataformat(filename);
    9292  else
    9393    error('First input argument has to be of class STRING!')
     
    129129 case 'mat'
    130130
    131   % Show an2_calc_wait
     131  % Show aedes_calc_wait
    132132  if showWbar
    133     [h,txh]=an2_calc_wait('Loading data from Matlab MAT-File...');
     133    [h,txh]=aedes_calc_wait('Loading data from Matlab MAT-File...');
    134134    drawnow
    135135  end
     
    213213  %% Set data format string
    214214  try
    215         DATA=an2_smisread(filename);
     215        DATA=aedes_smisread(filename);
    216216  catch
    217217        DATA=[];
     
    232232 case {'nifti'}
    233233 
    234   % Show an2_calc_wait
     234  % Show aedes_calc_wait
    235235  if showWbar
    236     [h,txh]=an2_calc_wait('Reading data in NIfTI/Analyze75 format...');
     236    [h,txh]=aedes_calc_wait('Reading data in NIfTI/Analyze75 format...');
    237237  end
    238238 
     
    240240  [fp,fn,fe] = fileparts(filename);
    241241  if ~isempty(fe) && strcmpi(fe,'.img')
    242     [DATA,msg]=an2_read_nifti(filename);
     242    [DATA,msg]=aedes_read_nifti(filename);
    243243    if isempty(DATA)
    244244      if showWbar
     
    249249    delete(h);
    250250  else
    251     [DATA,msg]=an2_read_nifti(filename,'header');
     251    [DATA,msg]=aedes_read_nifti(filename,'header');
    252252    if isempty(DATA)
    253253      if showWbar
     
    258258   
    259259    % Read NIfTI and Analyze 7.5 format data
    260     [DATA,msg]=an2_read_nifti(DATA.HDR);
     260    [DATA,msg]=aedes_read_nifti(DATA.HDR);
    261261    if isempty(DATA)
    262262      if showWbar
     
    282282 
    283283  %% Read parameters from procpar file
    284   [procpar,msg]=an2_readprocpar([f_path,'procpar']);%,'wbar',showWbar);
     284  [procpar,msg]=aedes_readprocpar([f_path,'procpar']);%,'wbar',showWbar);
    285285  if isempty(procpar)
    286286    DATA=[];
     
    377377  %% Read data from fid file
    378378  try
    379     DATA=an2_readfid([f_path,'fid'],...
     379    DATA=aedes_readfid([f_path,'fid'],...
    380380          'procpar',procpar,...
    381381          'wbar',showWbar,...
     
    404404 case 'dcm'
    405405 
    406   % Show an2_calc_wait
     406  % Show aedes_calc_wait
    407407  if showWbar
    408     [h,txh]=an2_calc_wait('Reading data from DICOM file...');
     408    [h,txh]=aedes_calc_wait('Reading data from DICOM file...');
    409409  end
    410410   
     
    451451  %% Read Data
    452452  try
    453     [DATA,msg]=an2_readctdata(filename);
     453    [DATA,msg]=aedes_readctdata(filename);
    454454    if isempty(DATA)
    455455      return
     
    471471   
    472472    %% Read data
    473     DATA=an2_readfdf(filename);
     473    DATA=aedes_readfdf(filename);
    474474    if isempty(DATA)
    475475          DATA=[];
     
    502502    DATA={};
    503503        if showWbar
    504           [calc_h,txh]=an2_calc_wait({['Reading file 1/' num2str(length(filenames))], ...
     504          [calc_h,txh]=aedes_calc_wait({['Reading file 1/' num2str(length(filenames))], ...
    505505                '""'});
    506506        end
     
    525525         
    526526          try
    527                 DATA{ii}=an2_data_read([pathnames{ii},filenames{ii}],'wbar','off');
     527                DATA{ii}=aedes_data_read([pathnames{ii},filenames{ii}],'wbar','off');
    528528          catch
    529529                error(['Unknown error occurred while reading ROI-file "%s". ',...
     
    569569                  k = RotateFlip3d{ii}{2};
    570570                  dim = RotateFlip3d{ii}{3};
    571                   DATA{1}.FTDATA = an2_rot3d(DATA{1}.FTDATA,k,dim);
     571                  DATA{1}.FTDATA = aedes_rot3d(DATA{1}.FTDATA,k,dim);
    572572                elseif strcmpi(RotateFlip3d{ii}{1},'flip')
    573573                  dim = RotateFlip3d{ii}{2};
  • aedes_editstack.m

    r78 r80  
    1 function [filelist,rem_ind,add_ind,sort_ind] = an2_editstack(DATA)
    2 % AN2_EDITSTACK - GUI for editing image stack
     1function [filelist,rem_ind,add_ind,sort_ind] = aedes_editstack(DATA)
     2% AEDES_EDITSTACK - GUI for editing image stack
    33%   
    44%
     
    8585%% Load default font and colors
    8686%FigColor=get(0,'DefaultUicontrolBackgroundcolor');
    87 GD=an2_gui_defaults;
     87GD=aedes_gui_defaults;
    8888%GD.col.mainfig = FigColor;
    8989fig_h = 305;
     
    402402
    403403% Ask for a file
    404 [filefilt,dataformats] = an2_getfilefilter;
    405 [fn, fp, fi] = an2_juigetfiles(filefilt,...
     404[filefilt,dataformats] = aedes_getfilefilter;
     405[fn, fp, fi] = aedes_juigetfiles(filefilt,...
    406406  'Select Data File(s)',filepath);
    407407if isequal(fn,0) || isequal(fp,0)
  • aedes_errordump.m

    r78 r80  
    1 function an2_errordump(errorstruct)
    2 % AN2_ERRORDUMP - Write the lasterror structure into file
     1function aedes_errordump(errorstruct)
     2% AEDES_ERRORDUMP - Write the lasterror structure into file
    33%   
    44%
     
    3939 
    4040  % Get revision information
    41   [rev,repo]=an2_revision;
     41  [rev,repo]=aedes_revision;
    4242 
    4343  % Save the errorstruct
     
    5555        errorstruct.message,errorstruct.identifier,'',...
    5656        ['If you get this error dialog every time you try to close Aedes ' ...
    57         'main window, run the command "an2_killfigs" in the Matlab ' ...
     57        'main window, run the command "aedes_killfigs" in the Matlab ' ...
    5858        'workspace. This will delete ALL currently open Matlab figures ' ...
    5959        'with brute force!!!']},...
  • aedes_export_gui.m

    r78 r80  
    1 function an2_export_gui(DATA,ROI,Clim_in,colmap_in,roiTransp,showRoiEdges,overlay)
    2 % AN2_EXPORT_GUI - Graphical user interface for exporting mri images
     1function aedes_export_gui(DATA,ROI,Clim_in,colmap_in,roiTransp,showRoiEdges,overlay)
     2% AEDES_EXPORT_GUI - Graphical user interface for exporting mri images
    33%   
    44%
     
    113113
    114114  %% Load default font and colors
    115   GD=an2_gui_defaults;
     115  GD=aedes_gui_defaults;
    116116 
    117117  % Position figure to the center of the screen
     
    10471047 
    10481048  %% Show wait dialog
    1049   [wait_h,txh]=an2_calc_wait('Creating mosaic from slices...');
     1049  [wait_h,txh]=aedes_calc_wait('Creating mosaic from slices...');
    10501050 
    10511051  % Draw the mosaic figure
     
    14761476
    14771477  % Initialize waitbar
    1478   wbar_h = an2_wbar(0,sprintf('Creating %s-image %d/%d to folder\n"%s"',...
     1478  wbar_h = aedes_wbar(0,sprintf('Creating %s-image %d/%d to folder\n"%s"',...
    14791479    upper(fext),0,length(fnames),outdir));
    14801480
     
    14831483
    14841484    % Initialize waitbar
    1485     an2_wbar(ii/length(fnames),wbar_h,sprintf('Creating %s-image %d/%d to folder\n"%s"',...
     1485    aedes_wbar(ii/length(fnames),wbar_h,sprintf('Creating %s-image %d/%d to folder\n"%s"',...
    14861486      upper(fext),ii,length(fnames),...
    14871487      outdir));
  • aedes_fitmaps.m

    r78 r80  
    1 function map_struct = an2_fitmaps(DATA,maptype,fit_vals,varargin)
    2 % AN2_FITMAPS - Calculate various parameter maps (T1, T2, T1rho, B1,
     1function map_struct = aedes_fitmaps(DATA,maptype,fit_vals,varargin)
     2% AEDES_FITMAPS - Calculate various parameter maps (T1, T2, T1rho, B1,
    33%               Perfusion, etc.)
    44%   
    55%
    66% Synopsis:
    7 %       MapStruct = an2_fitmaps(data,maptype,fit_vals,...
     7%       MapStruct = aedes_fitmaps(data,maptype,fit_vals,...
    88%                                'property1',value1,'property2',value2,...)
    99%
     
    462462for ii=1:Dat.nMaps
    463463  if Dat.wbar && ii==1
    464     wbh=an2_wbar(0,sprintf('Processing map %d/%d',ii,Dat.nMaps));
     464    wbh=aedes_wbar(0,sprintf('Processing map %d/%d',ii,Dat.nMaps));
    465465  elseif Dat.wbar
    466     an2_wbar(counter/nFits,wbh,sprintf('Processing map %d/%d',ii,Dat.nMaps));
     466    aedes_wbar(counter/nFits,wbh,sprintf('Processing map %d/%d',ii,Dat.nMaps));
    467467  end
    468468 
     
    471471      if ~isempty(Dat.Mask) && ~Dat.Mask(kk,tt,ii)
    472472        if Dat.wbar
    473           an2_wbar(counter/nFits,wbh);
     473          aedes_wbar(counter/nFits,wbh);
    474474        end
    475475        counter = counter+1;
     
    509509     
    510510      if Dat.wbar
    511         an2_wbar(counter/nFits,wbh);
     511        aedes_wbar(counter/nFits,wbh);
    512512      end
    513513      counter = counter+1;
     
    567567for ii=1:Dat.nMaps
    568568  if Dat.wbar && ii==1
    569         wbh=an2_wbar(0,sprintf('Calculating B1-map %d/%d',ii,Dat.nMaps));
     569        wbh=aedes_wbar(0,sprintf('Calculating B1-map %d/%d',ii,Dat.nMaps));
    570570  elseif Dat.wbar
    571         an2_wbar(counter/nFits,wbh,sprintf('Calculating map %d/%d',ii,Dat.nMaps));
     571        aedes_wbar(counter/nFits,wbh,sprintf('Calculating map %d/%d',ii,Dat.nMaps));
    572572  end
    573573 
     
    620620         
    621621          if Dat.wbar
    622                 an2_wbar(counter/nFits,wbh);
     622                aedes_wbar(counter/nFits,wbh);
    623623          end
    624624          counter = counter+1;
     
    696696  for ii=1:Dat.nMaps
    697697        if Dat.wbar && ii==1
    698           wbh=an2_wbar(0,sprintf('Processing map %d/%d',ii,Dat.nMaps));
     698          wbh=aedes_wbar(0,sprintf('Processing map %d/%d',ii,Dat.nMaps));
    699699        elseif Dat.wbar
    700           an2_wbar(counter/nFits,wbh,sprintf('Processing map %d/%d',ii,Dat.nMaps));
     700          aedes_wbar(counter/nFits,wbh,sprintf('Processing map %d/%d',ii,Dat.nMaps));
    701701        end
    702702       
     
    715715          counter = counter+1;
    716716          if Dat.wbar
    717                 an2_wbar(counter/nFits,wbh);
     717                aedes_wbar(counter/nFits,wbh);
    718718          end
    719719    end
     
    739739  for ii=1:Dat.nMaps
    740740        if Dat.wbar && ii==1
    741           wbh=an2_wbar(0,sprintf('Processing map %d/%d',ii,Dat.nMaps));
     741          wbh=aedes_wbar(0,sprintf('Processing map %d/%d',ii,Dat.nMaps));
    742742        elseif Dat.wbar
    743           an2_wbar(counter/nFits,wbh,sprintf('Processing map %d/%d',ii,Dat.nMaps));
     743          aedes_wbar(counter/nFits,wbh,sprintf('Processing map %d/%d',ii,Dat.nMaps));
    744744        end
    745745       
     
    769769         
    770770                if Dat.wbar
    771                   an2_wbar(counter/nFits,wbh);
     771                  aedes_wbar(counter/nFits,wbh);
    772772                end
    773773                counter = counter+1;
  • aedes_getdataformat.m

    r78 r80  
    1 function dataformat = an2_getdataformat(filename)
    2 % AN2_GETDATAFORMAT - Try to determine the data format of a file
     1function dataformat = aedes_getdataformat(filename)
     2% AEDES_GETDATAFORMAT - Try to determine the data format of a file
    33%
    44%
    55% Synopsis:
    6 %       dataformat=an2_getdataformat(filename);
     6%       dataformat=aedes_getdataformat(filename);
    77%
    88% Description:
     
    2525%
    2626% See also:
    27 %       AEDES, AN2_DATA_READ
     27%       AEDES, AEDES_DATA_READ
    2828
    2929% This function is a part of Aedes - A graphical tool for analyzing
  • aedes_getfilefilter.m

    r78 r80  
    1 function [filefilt,dataformats]=an2_getfilefilter()
    2 % AN2_GETFILEFILTER - Get File Filter for uigetfile and an2_juigetfiles
     1function [filefilt,dataformats]=aedes_getfilefilter()
     2% AEDES_GETFILEFILTER - Get File Filter for uigetfile and aedes_juigetfiles
    33%   (this is a helper function)
    44%
    55% Synopsis:
    6 %       filefilt=an2_data_read
     6%       filefilt=aedes_data_read
    77%
    88% Description:
     
    1212%
    1313% See also:
    14 %       AEDES, AN2_DATA_READ
     14%       AEDES, AEDES_DATA_READ
    1515
    1616% This function is a part of Aedes - A graphical tool for analyzing
  • aedes_gui_defaults.m

    r78 r80  
    1 function Dat = an2_gui_defaults;
    2 % AN2_GUI_DEFAULTS - Default fonts and colors for GUIs
     1function Dat = aedes_gui_defaults;
     2% AEDES_GUI_DEFAULTS - Default fonts and colors for GUIs
    33%   
    44%
    55% Synopsis:
    6 %       Dat = an2_gui_defaults;
     6%       Dat = aedes_gui_defaults;
    77%
    88% Description:
  • aedes_helpabout.m

    r78 r80  
    1 function an2_helpabout()
    2 % AN2_HELPABOUT - Show Aedes About dialog
     1function aedes_helpabout()
     2% AEDES_HELPABOUT - Show Aedes About dialog
    33%   
    44%
     
    3030
    3131%% Load default font and colors
    32 GD=an2_gui_defaults;
     32GD=aedes_gui_defaults;
    3333
    3434% Position figure to the center of the screen
     
    113113
    114114% Version text
    115 [rev,repo,wc_dir] = an2_revision;
     115[rev,repo,wc_dir] = aedes_revision;
    116116version_tx = text('parent',bgax,...
    117117                  'horizontalalign','left',...
  • aedes_inputdlg.m

    r78 r80  
    1 function Resp=an2_inputdlg(prompt_str,title_str,default_answer)
    2 % AN2_INPUTDLG - Input dialog box
     1function Resp=aedes_inputdlg(prompt_str,title_str,default_answer)
     2% AEDES_INPUTDLG - Input dialog box
    33%   
    44%
    55% Synopsis:
    6 %        Resp=an2_inputdlg(prompt_str,title_str,default_answer)
     6%        Resp=aedes_inputdlg(prompt_str,title_str,default_answer)
    77%
    88% Description:
     
    5151
    5252%% Dialog figure -------------------
    53 GD = an2_gui_defaults;
     53GD = aedes_gui_defaults;
    5454scrsz = get(0,'screensize');
    5555fig_w=175;
  • aedes_iseven.m

    r78 r80  
    1 function isArgEven = an2_iseven(inarg)
    2 % AN2_ISEVEN - Check if input is even
     1function isArgEven = aedes_iseven(inarg)
     2% AEDES_ISEVEN - Check if input is even
    33%   
    44%
  • aedes_juigetfiles.m

    r78 r80  
    1 function [filename,filepath,filterindex] = an2_juigetfiles(filefilter,ftitle,defaultdir)
    2 % AN2_JUIGETFILES - A Java based file browser for selecting multiple files in
     1function [filename,filepath,filterindex] = aedes_juigetfiles(filefilter,ftitle,defaultdir)
     2% AEDES_JUIGETFILES - A Java based file browser for selecting multiple files in
    33% non-sorted order from different folders.
    44%   
    55%
    66% Synopsis:
    7 %       [FILENAME, PATHNAME, FILTERINDEX] = AN2_JUIGETFILES(FILTERSPEC,TITLE, DEFAULTPATH)
     7%       [FILENAME, PATHNAME, FILTERINDEX] = AEDES_JUIGETFILES(FILTERSPEC,TITLE, DEFAULTPATH)
    88%
    99% Description:
    10 %       The behavior of AN2_JUIGETFILES is very similar to UIGETFILE with a few
     10%       The behavior of AEDES_JUIGETFILES is very similar to UIGETFILE with a few
    1111%       exceptions. The UIGETFILE properties 'location' and 'multiselect'
    1212%       are not available. Output arguments FILENAME and PATHNAME will
     
    1818%       and unsupported functions. This is due to change from version to
    1919%       version and, thus, this function will probably be broken in future
    20 %       Matlab releases. At the moment, however, AN2_JUIGETFILES should
     20%       Matlab releases. At the moment, however, AEDES_JUIGETFILES should
    2121%       work with Matlab version from R14SP2 to R2007b.
    2222%
    2323% Examples:
    24 %       [filename, pathname, filterindex] = an2_juigetfiles( ...
     24%       [filename, pathname, filterindex] = aedes_juigetfiles( ...
    2525%       {'*.m;*.fig;*.mat;*.mdl', 'All MATLAB Files (*.m, *.fig, *.mat, *.mdl)';
    2626%        '*.m',  'M-files (*.m)'; ...
     
    6767%% Default colors and fonts for gui
    6868%FigColor=get(0,'DefaultUicontrolBackgroundcolor');
    69 GD=an2_gui_defaults;
     69GD=aedes_gui_defaults;
    7070FigColor = GD.col.mainfig;
    7171
     
    7878          'Name',ftitle, ...
    7979          'Numbertitle','off', ...
    80           'Tag','an2_juigetfiles_main_fig', ...
     80          'Tag','aedes_juigetfiles_main_fig', ...
    8181          'Color',FigColor,...%[236 233 216]./255,...%GD.col.mainfig, ...
    8282          'Toolbar','none', ...
     
    100100
    101101%% Try to find icon path
    102 tmp = which('an2_juigetfiles');
     102tmp = which('aedes_juigetfiles');
    103103if ~isempty(tmp)
    104104  [fp,fn,fe]=fileparts(tmp);
     
    362362% Close window
    363363delete(fig_h)
    364 clear an2_juigetfiles
     364clear aedes_juigetfiles
    365365return
    366366
     
    441441function l_ExpFcnAlt(h,evd,tree)
    442442
    443 H=getappdata(findall(0,'tag','an2_juigetfiles_main_fig'),'H');
     443H=getappdata(findall(0,'tag','aedes_juigetfiles_main_fig'),'H');
    444444set(H.fh,'pointer','watch')
    445445drawnow
     
    556556function l_DirNodeSelected(h,evd,tree,filetree)
    557557
    558 H=getappdata(findall(0,'tag','an2_juigetfiles_main_fig'),'H');
     558H=getappdata(findall(0,'tag','aedes_juigetfiles_main_fig'),'H');
    559559set(H.fh,'pointer','watch')
    560560drawnow
     
    806806
    807807% Get handles
    808 H=getappdata(findall(0,'tag','an2_juigetfiles_main_fig'),'H');
     808H=getappdata(findall(0,'tag','aedes_juigetfiles_main_fig'),'H');
    809809
    810810switch opt
     
    998998
    999999% Get handles
    1000 H=getappdata(findall(0,'tag','an2_juigetfiles_main_fig'),'H');
     1000H=getappdata(findall(0,'tag','aedes_juigetfiles_main_fig'),'H');
    10011001set(H.fh,'pointer','watch')
    10021002drawnow
     
    11441144
    11451145% Get handles
    1146 H=getappdata(findall(0,'tag','an2_juigetfiles_main_fig'),'H');
     1146H=getappdata(findall(0,'tag','aedes_juigetfiles_main_fig'),'H');
    11471147%set(H.back_btn,'enable','inactive')
    11481148%set(H.forward_btn,'enable','inactive')
  • aedes_killfigs.m

    r78 r80  
    1 function an2_killfigs()
    2 % AN2_KILLFIGS - Close all Matlab figures (also with hidden handles) with brute force
     1function aedes_killfigs()
     2% AEDES_KILLFIGS - Close all Matlab figures (also with hidden handles) with brute force
    33%   
    44%
  • aedes_maptool.m

    r78 r80  
    1 function an2_maptool()
    2 % AN2_MAPTOOL - A GUI for calculating various parameter maps
     1function aedes_maptool()
     2% AEDES_MAPTOOL - A GUI for calculating various parameter maps
    33%   
    44%
     
    5151%% Load default font and colors
    5252% DefaultColor=get(0,'DefaultUicontrolBackgroundcolor');
    53 GD=an2_gui_defaults;
     53GD=aedes_gui_defaults;
    5454% GD.col.frame = DefaultColor;
    5555
     
    6767% UiToolbar ----------------------
    6868try
    69   tmp=load('an2_cdata.mat');
     69  tmp=load('aedes_cdata.mat');
    7070catch
    71   error('Could not open an2_cdata.mat. Aborting...')
     71  error('Could not open aedes_cdata.mat. Aborting...')
    7272end
    7373Dat.cdata = tmp.cdata;
     
    477477  end
    478478
    479 end % an2_maptool()
     479end % aedes_maptool()
  • aedes_read_nifti.m

    r78 r80  
    1 function [DATA,msg] = an2_read_nifti(filename,varargin)
    2 % AN2_READ_NIFTI - Read NIfTI (*.nii) and Analyze 7.5 (*.hdr,*.img) files
     1function [DATA,msg] = aedes_read_nifti(filename,varargin)
     2% AEDES_READ_NIFTI - Read NIfTI (*.nii) and Analyze 7.5 (*.hdr,*.img) files
    33%   
    44%
    55% Synopsis:
    6 %       [DATA,msg]=an2_read_nifti(filename,opt)
    7 %       [DATA,msg]=an2_read_nifti(DATA.HDR)
     6%       [DATA,msg]=aedes_read_nifti(filename,opt)
     7%       [DATA,msg]=aedes_read_nifti(DATA.HDR)
    88%
    99% Description:
    1010%       The function reads the NIfTI and Analyze 7.5 file formats and
    1111%       returns data in DATA.FTDATA and header in DATA.HDR (for more
    12 %       information about the structure of DATA, see the help of AN2_READFID
    13 %       function, i.e. type "help an2_readfid"). If error has occurred during
     12%       information about the structure of DATA, see the help of AEDES_READFID
     13%       function, i.e. type "help aedes_readfid"). If error has occurred during
    1414%       reading, the DATA structure is empty and the second output
    1515%       argument msg contains the error message. The function is capable
     
    3535%
    3636% Examples:
    37 %       [DATA,msg]=an2_read_nifti(filename,'header'); % Read only header
    38 %       [DATA,msg]=an2_read_nifti(DATA.HDR);          % Read data
     37%       [DATA,msg]=aedes_read_nifti(filename,'header'); % Read only header
     38%       [DATA,msg]=aedes_read_nifti(DATA.HDR);          % Read data
    3939%       or
    40 %       [DATA,msg]=an2_read_nifti;                    % Browse for a file and
     40%       [DATA,msg]=aedes_read_nifti;                    % Browse for a file and
    4141%                                                 % read both header and
    4242%                                                 % data
    4343%       or
    44 %       [DATA,msg]=an2_read_nifti(filename)           % Read both header and
     44%       [DATA,msg]=aedes_read_nifti(filename)           % Read both header and
    4545%                                                 % data
    4646%
    4747% See also:
    48 %       AN2_READFID, AEDES, AN2_WRITE_NIFTI
     48%       AEDES_READFID, AEDES, AEDES_WRITE_NIFTI
    4949
    5050% This function is a part of Aedes - A graphical tool for analyzing
  • aedes_readctdata.m

    r78 r80  
    1 function [DATA,msg] = an2_readctdata(filename,varargin)
    2 % AN2_READCTDATA - Read Gamma Medica CT/SPECT data format
     1function [DATA,msg] = aedes_readctdata(filename,varargin)
     2% AEDES_READCTDATA - Read Gamma Medica CT/SPECT data format
    33%   
    44%
    55% Synopsis:
    6 %        [DATA,msg] = an2_readctdata(filename,varargin)
     6%        [DATA,msg] = aedes_readctdata(filename,varargin)
    77%
    88% Description:
     
    8080 
    8181  if ShowWbar
    82     % Show an2_calc_wait
    83     [h,txh]=an2_calc_wait('Reading SPECT/CT data...');
     82    % Show aedes_calc_wait
     83    [h,txh]=aedes_calc_wait('Reading SPECT/CT data...');
    8484    drawnow
    8585  end
     
    515515% Show waitbar
    516516if ShowWbar
    517   hWbar=an2_wbar(0,['Reading file 1/',num2str(nFiles)]);
     517  hWbar=aedes_wbar(0,['Reading file 1/',num2str(nFiles)]);
    518518  tmp_h=findall(hWbar,'string',['Reading file 1/',num2str(nFiles)]);
    519519  set(tmp_h,'interpreter','none')
     
    525525  % Update waitbar
    526526  if ShowWbar
    527     hWbar=an2_wbar(ii/nFiles,hWbar,...
     527    hWbar=aedes_wbar(ii/nFiles,hWbar,...
    528528               {['Reading file ',num2str(ii),'/',num2str(nFiles)],...
    529529                slice_files{ii}});
  • aedes_readfdf.m

    r78 r80  
    1 function DATA = an2_readfdf(filename,varargin)
    2 % AN2_READFDF - Read Varian Flexible Data Format (FDF) Files
     1function DATA = aedes_readfdf(filename,varargin)
     2% AEDES_READFDF - Read Varian Flexible Data Format (FDF) Files
    33%   
    44%
  • aedes_readfid.m

    r78 r80  
    1 function [DATA,msg_out] = an2_readfid(filename,varargin)
    2 % AN2_READFID - Read VNMR (Varian) FID-files
     1function [DATA,msg_out] = aedes_readfid(filename,varargin)
     2% AEDES_READFID - Read VNMR (Varian) FID-files
    33%   
    44%
    55% Synopsis:
    6 %        [DATA,msg]=an2_readfid(filename,'PropertyName1',value1,'PropertyName2',value2,...)
    7 %        [DATA,msg]=an2_readfid(filename,'header')
    8 %        [DATA,msg]=an2_readfid(filename,output_filename)
     6%        [DATA,msg]=aedes_readfid(filename,'PropertyName1',value1,'PropertyName2',value2,...)
     7%        [DATA,msg]=aedes_readfid(filename,'header')
     8%        [DATA,msg]=aedes_readfid(filename,output_filename)
    99%
    1010% Description:
     
    2121%                |-> fname        (file name)
    2222%                |-> fpath        (file path)
    23 %                |-> Param        (parameter values used by AN2_READFID to read the data)
     23%                |-> Param        (parameter values used by AEDES_READFID to read the data)
    2424%          |-> FTDATA             (real fourier transformed image data)
    2525%          |-> KSPACE             (complex k-space, empty by default)
     
    3030%        KSPACE, and PROCPAR fields) if an error has occurred during
    3131%        reading. The error message is returned in the second output
    32 %        argument msg. If AN2_READFID is called with only one output argument
     32%        argument msg. If AEDES_READFID is called with only one output argument
    3333%        (i.e. without MSG), the error message is echoed to the workspace.
    3434%       
     
    4242%        property and values 1, 2, or 3 (see below for more information).
    4343%
    44 %        The supported property-value pairs in AN2_READFID (property strings
     44%        The supported property-value pairs in AEDES_READFID (property strings
    4545%        are not case sensitive):
    4646%
     
    7272%                                               % procpar structure
    7373%                                               % will be read using
    74 %                                               % AN2_READPROCPAR
     74%                                               % AEDES_READPROCPAR
    7575%
    7676%        'ZeroPadding' :  ['off'|'on'|{'auto'}] % 'off' = force
     
    133133%
    134134% Examples:
    135 %        [DATA,msg]=an2_readfid(filename)             % Read image data from 'filename'
    136 %        [DATA,msg]=an2_readfid(filename,'header')    % Read only data file header
    137 %
    138 %        [DATA,msg]=an2_readfid(filename,'return',1)  % Return only image data (default)
    139 %        [DATA,msg]=an2_readfid(filename,'return',2)  % Return only k-space
    140 %        [DATA,msg]=an2_readfid(filename,'return',3)  % Return both image data and k-space
     135%        [DATA,msg]=aedes_readfid(filename)             % Read image data from 'filename'
     136%        [DATA,msg]=aedes_readfid(filename,'header')    % Read only data file header
     137%
     138%        [DATA,msg]=aedes_readfid(filename,'return',1)  % Return only image data (default)
     139%        [DATA,msg]=aedes_readfid(filename,'return',2)  % Return only k-space
     140%        [DATA,msg]=aedes_readfid(filename,'return',3)  % Return both image data and k-space
    141141%       
    142142%        % Read first data file header and then image data and k-space
    143 %        [DATA,msg]=an2_readfid(filename,'header')
    144 %        [DATA,msg]=an2_readfid(DATA.HDR,'return',3)
     143%        [DATA,msg]=aedes_readfid(filename,'header')
     144%        [DATA,msg]=aedes_readfid(DATA.HDR,'return',3)
    145145%
    146146%        % Read VNMR-data with default options and save slices in NIfTI
    147147%        % format
    148 %        DATA=an2_readfid('example.fid','saved_slices.nii');
     148%        DATA=aedes_readfid('example.fid','saved_slices.nii');
    149149%
    150150%        % If you want to use non-default options and also write
    151151%        % NIfTI-files, use the property/value formalism, for example
    152 %        DATA=an2_readfid('example.fid','ZeroPadding','off',...
     152%        DATA=aedes_readfid('example.fid','ZeroPadding','off',...
    153153%                     'OutputFile','saved_slices.nii');
    154154%
    155155% See also:
    156 %        AN2_READFIDPREFS, AN2_READPROCPAR, AN2_READTAB, AN2_DATA_READ,
    157 %        AN2_WRITE_NIFTI, AEDES
     156%        AEDES_READFIDPREFS, AEDES_READPROCPAR, AEDES_READPHASETABLE,
     157%        AEDES_DATA_READ, AEDES_WRITE_NIFTI, AEDES
    158158
    159159% This function is a part of Aedes - A graphical tool for analyzing
     
    454454%% Read procpar if not given as input argument
    455455if isempty(procpar) || nargin~=2
    456   [procpar,proc_msg]=an2_readprocpar([fpath,'procpar']);
     456  [procpar,proc_msg]=aedes_readprocpar([fpath,'procpar']);
    457457  if isempty(procpar)
    458458    DATA=[];
     
    485485    end
    486486  end
    487   [phasetable,msg] = an2_readtab([tabpath,procpar.petable{1}]);
     487  [phasetable,msg] = aedes_readphasetable([tabpath,procpar.petable{1}]);
    488488 
    489489  % If petable cannot be found, check if it is in procpar...
     
    509509    %% If the FID-file has been sorted, the reading can continue but
    510510    % throw a warning.
    511     fprintf(1,'Warning: an2_readfid: Could not find phasetable "%s" in "%s"!\n',procpar.petable{1},tabpath)
     511    fprintf(1,'Warning: aedes_readfid: Could not find phasetable "%s" in "%s"!\n',procpar.petable{1},tabpath)
    512512    Dat.phasetable=[];
    513513  else
     
    656656  nFiles = length(filenames);
    657657   
    658   h=an2_wbar(0,sprintf('Saving slice 1/%d in NIfTI format...',nFiles));
     658  h=aedes_wbar(0,sprintf('Saving slice 1/%d in NIfTI format...',nFiles));
    659659  for ii=1:nFiles
    660     an2_wbar(ii/nFiles,h,sprintf('Saving slice %d/%d in NIfTI format...',ii, ...
     660    aedes_wbar(ii/nFiles,h,sprintf('Saving slice %d/%d in NIfTI format...',ii, ...
    661661                             nFiles))
    662     [done,msg]=an2_write_nifti(DATA.FTDATA(:,:,ii),...
     662    [done,msg]=aedes_write_nifti(DATA.FTDATA(:,:,ii),...
    663663                           [niipath,filenames{ii}],'DataType','single',...
    664664                           'FileType',2);
     
    907907  % Initialize waitbar
    908908  if Dat.ShowWaitbar
    909         wb_h = an2_wbar(0/hdr.FileHeader.nblocks,...
     909        wb_h = aedes_wbar(0/hdr.FileHeader.nblocks,...
    910910          {['Reading ',num2str(AcqType),'D VNMR data (seqcon: "' seqcon '")'],...
    911911          ['(Processing data block ' ...
     
    917917        %% Update waitbar
    918918        if Dat.ShowWaitbar
    919           an2_wbar(ii/hdr.FileHeader.nblocks,...
     919          aedes_wbar(ii/hdr.FileHeader.nblocks,...
    920920                wb_h,...
    921921                {['Reading ',num2str(AcqType),'D VNMR data (seqcon: "' seqcon '")'],...
     
    10481048  % Initialize waitbar
    10491049  if Dat.ShowWaitbar
    1050         wb_h = an2_calc_wait(['Reading ',num2str(AcqType),...
     1050        wb_h = aedes_calc_wait(['Reading ',num2str(AcqType),...
    10511051          'D VNMR data (seqcon: "' seqcon '")']);
    10521052  end
     
    14171417  %% Fourier transform spectral data
    14181418  if AcqType==1
    1419         wb_h = an2_wbar(0,'Fourier transforming spectral data');
     1419        wb_h = aedes_wbar(0,'Fourier transforming spectral data');
    14201420    %data=zeros(size(kspace),'single');
    14211421        data=kspace;
     
    14261426        %% Update waitbar
    14271427        if Dat.ShowWaitbar
    1428           an2_wbar(count/sz,...
     1428          aedes_wbar(count/sz,...
    14291429               wb_h,...
    14301430               {'Fourier transforming spectral data',...
     
    14961496      end
    14971497      if Dat.ShowWaitbar
    1498         [wb_h,txh]=an2_calc_wait('Fourier transforming image data...');
     1498        [wb_h,txh]=aedes_calc_wait('Fourier transforming image data...');
    14991499      end
    15001500      %data=permute(fftshift(fftshift(abs(fft(permute(fft(data),[2 1 3 4]))),1),2),[2 1 3 4]);
     
    15031503      %% Fourier transform 3D image data
    15041504      if Dat.ShowWaitbar
    1505         [wb_h,txh]=an2_calc_wait('Fourier transforming 3D image data...');
     1505        [wb_h,txh]=aedes_calc_wait('Fourier transforming 3D image data...');
    15061506      end
    15071507     
     
    15321532      orient = procpar.orient{1};
    15331533      if any(strcmpi(orient,{'xyz','trans90','cor90','sag90'}))
    1534         data = flipdim(an2_rot3d(data,1,3),2);
     1534        data = flipdim(aedes_rot3d(data,1,3),2);
    15351535      elseif strcmpi(orient,'oblique')
    15361536        data = flipdim(flipdim(data,1),2);
  • aedes_readfidprefs.m

    r78 r80  
    1 function an2_readfidprefs()
    2 % AN2_READFIDPREFS - GUI for editing preferences for AEDES and
    3 % AN2_DATA_READ for VNMR format files
     1function aedes_readfidprefs()
     2% AEDES_READFIDPREFS - GUI for editing preferences for AEDES and
     3% AEDES_DATA_READ for VNMR format files
    44%   
    55%
    66% Synopsis:
    7 %        an2_readfidprefs;
     7%        aedes_readfidprefs;
    88%
    99% Description:
     
    1212%
    1313% See also:
    14 %        AEDES, AN2_DATA_READ
     14%        AEDES, AEDES_DATA_READ
    1515
    1616% This function is a part of Aedes - A graphical tool for analyzing
     
    149149%% Load default font and colors
    150150%FigColor=get(0,'DefaultUicontrolBackgroundcolor');
    151 GD=an2_gui_defaults;
     151GD=aedes_gui_defaults;
    152152%GD.col.mainfig = FigColor;
    153153fig_h = 280;
  • aedes_readphasetable.m

    r78 r80  
    1 function [tablib,msg] = an2_readtab(filename)
    2 % AN2_READTAB - Read VNMR table file
     1function [tablib,msg] = aedes_readphasetable(filename)
     2% AEDES_READPHASETABLE - Read VNMR table file
    33%   
    44%
    55% Synopsis:
    6 %       [tablib,msg]=an2_readtab(filename)
     6%       [tab,msg]=aedes_readphasetable(filename)
    77%
    88% Description:
    99%       The function reads and interprets a Varian phase table file
    1010%       "filename" given as a string input argument. The phase order is
    11 %       returned in the output argument "tablib". The second output
     11%       returned in the output argument "tab". The second output
    1212%       argument contains the possible error message. If no error
    1313%       occurred, the output argument "msg" is empty.
    1414%
    1515% Examples:
    16 %       [tablib,msg]=an2_readtab('64alt2k');
     16%       [tab,msg]=aedes_readphasetable('64alt2k');
    1717%
    1818% See also:
    19 %       AN2_READFID, AN2_READPROCPAR, AEDES
     19%       AEDES_READFID, AEDES_READPROCPAR, AEDES
    2020
    2121% This function is a part of Aedes - A graphical tool for analyzing
  • aedes_readprocpar.m

    r78 r80  
    1 function [procpar,msg] = an2_readprocpar(filename)
    2 % AN2_READPROCPAR - Read VNMR (Varian) PROCPAR-file
     1function [procpar,msg] = aedes_readprocpar(filename)
     2% AEDES_READPROCPAR - Read VNMR (Varian) PROCPAR-file
    33%   
    44%
    55% Synopsis:
    6 %       [procpar,msg]=an2_readprocpar(filename)
     6%       [procpar,msg]=aedes_readprocpar(filename)
    77%
    88% Description:
     
    1717%       occurred.
    1818%
    19 %       NOTE: AN2_READPROCPAR adds an additional array field in the
     19%       NOTE: AEDES_READPROCPAR adds an additional array field in the
    2020%       procpar-structure. The parameter procpar.arrayjoint does NOT
    2121%       exist in the original procpar-file. The arrayjoint field contains
     
    2525%
    2626% Examples:
    27 %       procpar=an2_readprocpar('C:\MyData\MyAcquisition.fid\procpar')
     27%       procpar=aedes_readprocpar('C:\MyData\MyAcquisition.fid\procpar')
    2828%
    2929%       or
    3030%
    31 %       procpar=an2_readprocpar('C:\MyData\MyAcquisition.fid')
     31%       procpar=aedes_readprocpar('C:\MyData\MyAcquisition.fid')
    3232%
    3333% See also:
    34 %       AN2_READFID, AN2_DATA_READ, AEDES, AN2_READTAB
     34%       AEDES_READFID, AEDES_DATA_READ, AEDES, AEDES_READTAB
    3535
    3636% This function is a part of Aedes - A graphical tool for analyzing
  • aedes_res2table.m

    r78 r80  
    1 function ResTable = an2_res2table(Res,varargin)
    2 % AN2_RES2TABLE -
     1function ResTable = aedes_res2table(Res,varargin)
     2% AEDES_RES2TABLE -
    33%   
    44%
     
    124124      ResTable(start_ind+3:start_ind+3+length(Res.Stat(ii).Mean)-1,1) = fnames;
    125125      ResTable(start_ind+3:start_ind+3+length(Res.Stat(ii).Mean)-1,2:end-1) = ...
    126           strrep(an2_cellsprintf(['%.' num2str(NumDec) 'f'],mtrx(:,1:end-1)),'.', ...
     126          strrep(aedes_cellsprintf(['%.' num2str(NumDec) 'f'],mtrx(:,1:end-1)),'.', ...
    127127                 DecSep);
    128128      ResTable(start_ind+3:start_ind+3+length(Res.Stat(ii).Mean)-1,end) = ...
    129           strrep(an2_cellsprintf(['%.0f'],mtrx(:,end)),'.', ...
     129          strrep(aedes_cellsprintf(['%.0f'],mtrx(:,end)),'.', ...
    130130                 DecSep);
    131131      start_ind = start_ind+3+size(mtrx,1);
     
    141141          = {Res.Stat(ii).Label};
    142142      ResTable(start_ind+2+ii:nRois:start_ind+3+nRois*length(Res.Stat(ii).Mean)-1,3:end-1) ...
    143           = strrep(an2_cellsprintf(['%.' num2str(NumDec) 'f'],mtrx(:,1:end-1)),'.', ...
     143          = strrep(aedes_cellsprintf(['%.' num2str(NumDec) 'f'],mtrx(:,1:end-1)),'.', ...
    144144                   DecSep);
    145145      ResTable(start_ind+2+ii:nRois:start_ind+3+nRois*length(Res.Stat(ii).Mean)-1,end) = ...
    146           strrep(an2_cellsprintf(['%.0f'],mtrx(:,end)),'.', ...
     146          strrep(aedes_cellsprintf(['%.0f'],mtrx(:,end)),'.', ...
    147147                 DecSep);
    148148    end
     
    161161          Res.Stat(kk).Max];
    162162        ResTable{RowInd,1} = Res.Stat(kk).Label;
    163         ResTable(RowInd,2:6) = strrep(an2_cellsprintf(['%.' num2str(NumDec) 'f'],...
     163        ResTable(RowInd,2:6) = strrep(aedes_cellsprintf(['%.' num2str(NumDec) 'f'],...
    164164          totals),'.',DecSep);
    165         ResTable(RowInd,7) =  strrep(an2_cellsprintf('%.0f',Res.Stat(kk).PixelCount),'.',...
     165        ResTable(RowInd,7) =  strrep(aedes_cellsprintf('%.0f',Res.Stat(kk).PixelCount),'.',...
    166166          DecSep);
    167167        RowInd=RowInd+1;
     
    197197            cellstr(repmat(Res.Stat(ii).Label,length(totals(:,1)),1));
    198198        ResTable(RowInd:RowInd+length(totals(:,1))-1,2:end-1) = ...
    199             strrep(an2_cellsprintf(['%.' num2str(NumDec) 'f'],...
     199            strrep(aedes_cellsprintf(['%.' num2str(NumDec) 'f'],...
    200200                               totals),'.',DecSep);
    201201        ResTable(RowInd:RowInd+length(totals(:,1))-1,end) = ...
    202             strrep(an2_cellsprintf('%.0f',Res.Stat(ii).(D).PixelCount),'.',...
     202            strrep(aedes_cellsprintf('%.0f',Res.Stat(ii).(D).PixelCount),'.',...
    203203                   DecSep);
    204204        RowInd = RowInd+length(totals(:,1));
  • aedes_resviewer.m

    r78 r80  
    1 function an2_resviewer(Res_in)
    2 % AN2_RESVIEWER - View and convert Aedes statistics results
     1function aedes_resviewer(Res_in)
     2% AEDES_RESVIEWER - View and convert Aedes statistics results
    33%   
    44%
    55% Synopsis:
    6 %       an2_resviewer(Res)
     6%       aedes_resviewer(Res)
    77%
    88% Description:
    9 %       The AN2_RESVIEWER function opens a graphical user interface (GUI) for
     9%       The AEDES_RESVIEWER function opens a graphical user interface (GUI) for
    1010%       handling Res-structures or *.res files saved from AEDES. If
    1111%       the function is called with the optional input argument Res, the
     
    2020%       tmp=load('resfile.res','mat'); % Read saved Res-file
    2121%       Res=tmp.Res;                   
    22 %       an2_resviewer(Res)                 % Open the loaded Res-structure
     22%       aedes_resviewer(Res)                 % Open the loaded Res-structure
    2323%
    2424% See also:
     
    8484 
    8585%% Load default font and colors
    86   GD=an2_gui_defaults;
     86  GD=aedes_gui_defaults;
    8787 
    8888  % Position figure to the center of the screen
     
    253253    isEnabled = 'on';
    254254  end
    255   btn_cdata = load('an2_cdata.mat');
     255  btn_cdata = load('aedes_cdata.mat');
    256256  tmp = get(H.EXPORT_FILETYPES_GRP,'position');
    257257  H.SELFILES_UIPANEL = uipanel('parent',H.MAIN_UIPANEL,...
     
    309309 
    310310  %% RESTABLE -----------------------------------
    311   %ResTable=an2_res2table('..\ROI_test\t1001001.res');
     311  %ResTable=aedes_res2table('..\ROI_test\t1001001.res');
    312312  H.RESTABLE = uitable('Parent',H.MAINFIG,'position',[10 10 fig_w-2*10 300]);
    313313  H.RESFRAME = uicontrol('parent',H.MAINFIG,...
     
    398398  if strcmpi(opt,'add')
    399399   
    400     [fname,pname]=an2_juigetfiles({'*.res;*.RES','Aedes Res-files (*.res)';...
     400    [fname,pname]=aedes_juigetfiles({'*.res;*.RES','Aedes Res-files (*.res)';...
    401401                   '*.*','All Files (*.*)'},...
    402402                              'Select Res-files',pwd);
     
    623623
    624624  % Generate cell table from Res
    625   ResTable = an2_res2table(Dat.Res,'sortbyroi',sortbyroi,...
     625  ResTable = aedes_res2table(Dat.Res,'sortbyroi',sortbyroi,...
    626626                       'decsep',decsep,'numdec',numdec,...
    627627                       'resfilename',Dat.ResFileName,...
     
    743743  %% Start Exporting files --------------------------
    744744  if ~Dat.SingleFileMode
    745     wbar_h=an2_wbar(0,{'Processing file','""'});
     745    wbar_h=aedes_wbar(0,{'Processing file','""'});
    746746    set(get(findall(wbar_h,'type','axes'),'title'),'interpreter','none')
    747747    nFiles = size(UD,1);
     
    751751      [fp,fn,fe]=fileparts(UD{ii,2});
    752752      outfilename = [outdir,fn];
    753       an2_wbar(ii/nFiles,wbar_h,{'Processing file',['"',resfilename,'"']});
     753      aedes_wbar(ii/nFiles,wbar_h,{'Processing file',['"',resfilename,'"']});
    754754     
    755755      % Open file
     
    771771     
    772772      % Generate cell table
    773       ResTable = an2_res2table(tmp.Res,'sortbyroi',sortbyroi,...
     773      ResTable = aedes_res2table(tmp.Res,'sortbyroi',sortbyroi,...
    774774                           'decsep',decsep,'numdec',numdec,...
    775775                           'resfilename',resfilename,...
     
    787787      % Write TXT
    788788      if WriteTXT
    789         bool = an2_cellwrite(ResTable,[outfilename,'.txt'],...
     789        bool = aedes_cellwrite(ResTable,[outfilename,'.txt'],...
    790790                         'delimitter','tab');
    791791        if ~bool
     
    857857   
    858858    % Generate cell table
    859     ResTable = an2_res2table(Dat.Res,'sortbyroi',sortbyroi,...
     859    ResTable = aedes_res2table(Dat.Res,'sortbyroi',sortbyroi,...
    860860                         'decsep',decsep,'numdec',numdec,...
    861861                         'resfilename','',...
    862862                         'dirs',Dat.dirs);
    863863   
    864     % Show an2_calc_wait
    865     [h,txh]=an2_calc_wait('');
     864    % Show aedes_calc_wait
     865    [h,txh]=aedes_calc_wait('');
    866866   
    867867    % Write XLS
     
    880880      set(txh,'string',{'Writing TXT file',[fpath,txtfname]})
    881881      drawnow
    882       bool = an2_cellwrite(ResTable,[fpath,txtfname],...
     882      bool = aedes_cellwrite(ResTable,[fpath,txtfname],...
    883883                       'delimitter','tab');
    884884      if ~bool
     
    948948%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    949949%
    950 % QUIT AN2_RESVIEWER
     950% QUIT AEDES_RESVIEWER
    951951%
    952952%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    957957  clear H Dat
    958958 
    959   % Close an2_resviewer window
     959  % Close aedes_resviewer window
    960960  delete(fig_h)
    961961 
     
    987987end % function l_ShowFullPath(h,
    988988
    989 end % function an2_resviewer(Res_in)
    990 
     989end % function aedes_resviewer(Res_in)
     990
  • aedes_revision.m

    r79 r80  
    1 function [rev,repo,workingcopy] = an2_revision()
    2 % AN2_REVISION - Returns the current revision of Aedes
     1function [rev,repo,workingcopy] = aedes_revision()
     2% AEDES_REVISION - Returns the current revision of Aedes
    33%   
    44%
    55% Synopsis:
    6 %        [rev,repo,workingcopy] = an2_revision;
     6%        [rev,repo,workingcopy] = aedes_revision;
    77%
    88% Description:
     
    9191
    9292% The next comment line is changed in every commit by the svncommit
    93 % bash-script every time it is called so that this file "an2_revision.m" is
     93% bash-script every time it is called so that this file "aedes_revision.m" is
    9494% always in the list of committed files. DO NOT EDIT THE NEXT LINE!!!
    95 % - SVN Hook -
     95% - Svn Hook -
  • aedes_roi_copy_gui.m

    r78 r80  
    1 function [slice_ind,dir_ind,roilabel,copytype] = an2_roi_copy_gui(ROI,roi_ind)
    2 % AN2_ROI_COPY_GUI -
     1function [slice_ind,dir_ind,roilabel,copytype] = aedes_roi_copy_gui(ROI,roi_ind)
     2% AEDES_ROI_COPY_GUI -
    33%   
    44%
     
    6868%% Load default font and colors
    6969FigColor=get(0,'DefaultUicontrolBackgroundcolor');
    70 GD=an2_gui_defaults;
     70GD=aedes_gui_defaults;
    7171GD.col.mainfig = FigColor;%[236 233 216]./255;
    7272fig_h = 415;%395;
  • aedes_roi_stats.m

    r78 r80  
    1 function Res = an2_roi_stats(DATA,ROI)
    2 % AN2_ROI_STATS - Calculate ROI statistics
     1function Res = aedes_roi_stats(DATA,ROI)
     2% AEDES_ROI_STATS - Calculate ROI statistics
    33%   
    44%
  • aedes_rot3d.m

    r78 r80  
    1 function B = an2_rot3d(A,k,dim)
    2 % AN2_ROT3D - Rotate 3D (or 4D) matrix in 90 degree steps in 3 dimensions
     1function B = aedes_rot3d(A,k,dim)
     2% AEDES_ROT3D - Rotate 3D (or 4D) matrix in 90 degree steps in 3 dimensions
    33%
    44%
     
    3030
    3131if nargin<2
    32   error('AN2_ROT3D: Too few input arguments!')
     32  error('AEDES_ROT3D: Too few input arguments!')
    3333elseif nargin<3
    3434  dim = 3; % Use dim 3 as a default
  • aedes_rotateflip.m

    r78 r80  
    1 function Out = an2_rotateflip(DATA,squareImages)
    2 % AN2_ROTATEFLIP - GUI for rotating and flipping files
     1function Out = aedes_rotateflip(DATA,squareImages)
     2% AEDES_ROTATEFLIP - GUI for rotating and flipping files
    33%   
    44%
     
    5555%% Load default font and colors
    5656%FigColor=get(0,'DefaultUicontrolBackgroundcolor');
    57 GD=an2_gui_defaults;
     57GD=aedes_gui_defaults;
    5858%GD.col.mainfig = FigColor;
    5959fig_h = 305;
  • aedes_saveres.m

    r78 r80  
    1 function [done,msg] = an2_saveres(DATA,ROI,filename,varargin)
    2 % AN2_SAVERES - Save Aedes results (statistics and ROIs)
     1function [done,msg] = aedes_saveres(DATA,ROI,filename,varargin)
     2% AEDES_SAVERES - Save Aedes results (statistics and ROIs)
    33%   
    44%
     
    138138 
    139139  if ShowWbar
    140     [h,txh]=an2_calc_wait({'Saving ROI(s)...',...
     140    [h,txh]=aedes_calc_wait({'Saving ROI(s)...',...
    141141                      ['(',FilePath,FileName,'.roi)']});
    142142  end
     
    184184 
    185185  if ShowWbar
    186     [h,txh]=an2_calc_wait({'Saving ROI(s)...',...
     186    [h,txh]=aedes_calc_wait({'Saving ROI(s)...',...
    187187                      ['(',FilePath,FileName,'.roi)']});
    188188  end
     
    221221 
    222222  if ShowWbar
    223     [h,txh]=an2_calc_wait({'Saving ROI Statistics...',...
     223    [h,txh]=aedes_calc_wait({'Saving ROI Statistics...',...
    224224                       ['(',FilePath,FileName,'.res)']});
    225225  end 
     
    299299  Res = [];
    300300  % Calculate results
    301   Res = an2_roi_stats(DATA,ROI);
     301  Res = aedes_roi_stats(DATA,ROI);
    302302  if isempty(Res)
    303303    msg = 'Error while calculating statistics. Could not save results.';
  • aedes_smisread.m

    r78 r80  
    1 function DATA = an2_smisread(filename,opt)
    2 % AN2_SMISREAD - Read S.M.I.S. Data Files (*.sur)
     1function DATA = aedes_smisread(filename,opt)
     2% AEDES_SMISREAD - Read S.M.I.S. Data Files (*.sur)
    33%   
    44%
    55% Synopsis:
    6 %       DATA = an2_smisread(filename)
     6%       DATA = aedes_smisread(filename)
    77%
    88% Description:
     
    1212%
    1313% See also:
    14 %       AN2_READFID, AN2_READ_NIFTI
     14%       AEDES_READFID, AEDES_READ_NIFTI
    1515
    1616% This function is a part of Aedes - A graphical tool for analyzing
  • aedes_smiswrite.m

    r78 r80  
    1 function an2_smiswrite(data,filename,varargin)
    2 % AN2_SMISWRITE - Write S.M.I.S. Data Files (*.sur)
     1function aedes_smiswrite(data,filename,varargin)
     2% AEDES_SMISWRITE - Write S.M.I.S. Data Files (*.sur)
    33%   
    44%
    55% Synopsis:
    6 %       an2_smiswrite(data,filename,param1,value1,param2,value2,...)
     6%       aedes_smiswrite(data,filename,param1,value1,param2,value2,...)
    77%
    88% Description:
     
    1212%
    1313% See also:
    14 %       AN2_SMISREAD, AN2_READFID, AN2_READ_NIFTI
     14%       AEDES_SMISREAD, AEDES_READFID, AEDES_READ_NIFTI
    1515
    1616% This function is a part of Aedes - A graphical tool for analyzing
  • aedes_trendest.m

    r78 r80  
    1 function zz = an2_trendest(z,alpha);
    2 % AN2_TRENDEST - Estimate trends from signal using smoothness priors
     1function zz = aedes_trendest(z,alpha);
     2% AEDES_TRENDEST - Estimate trends from signal using smoothness priors
    33%
    44% Synopsis:
    5 %       function zz = an2_trendest(z,alpha)
     5%       function zz = aedes_trendest(z,alpha)
    66%
    77% Description:
  • aedes_update.m

    r78 r80  
    1 function done=an2_update(opt)
    2 % AN2_UPDATE - Aedes update tool
     1function done=aedes_update(opt)
     2% AEDES_UPDATE - Aedes update tool
    33%
    44% Synopsis:
    5 %       done=an2_update(opt)
     5%       done=aedes_update(opt)
    66%
    77% Description:
     
    1212%
    1313% See also:
    14 %       AN2_CHECK_UPDATES, AN2_REVISION, AEDES
     14%       AEDES_CHECK_UPDATES, AEDES_REVISION, AEDES
    1515
    1616% This function is a part of Aedes - A graphical tool for analyzing
     
    3939
    4040% Check if updates are available
    41 [isUpdateAvailable,HeadRev,WorkingCopyRev,error_msg]=an2_check_updates();
     41[isUpdateAvailable,HeadRev,WorkingCopyRev,error_msg]=aedes_check_updates();
    4242
    4343if isUpdateAvailable
     
    5959      return
    6060    end
    61     [cwh,txh]=an2_calc_wait('Installing updates...');
     61    [cwh,txh]=aedes_calc_wait('Installing updates...');
    6262  end
    6363elseif isempty(HeadRev)
  • aedes_viewprocpar.m

    r78 r80  
    1 function an2_viewprocpar(DATA)
    2 % AN2_VIEWPROCPAR - VNMR Procpar-file viewer
     1function aedes_viewprocpar(DATA)
     2% AEDES_VIEWPROCPAR - VNMR Procpar-file viewer
    33%   
    44%
     
    3131
    3232%% Load default font and colors
    33 GD=an2_gui_defaults;
     33GD=aedes_gui_defaults;
    3434
    3535% Position figure to the center of the screen
  • aedes_wbar.m

    r78 r80  
    1 function H = an2_wbar(varargin)
    2 % AN2_WBAR - Slightly modified Matlab Waitbar...
     1function H = aedes_wbar(varargin)
     2% AEDES_WBAR - Slightly modified Matlab Waitbar...
    33% Synopsis:
    44%       See the WAITBAR function synopsis by typing 'help waitbar' into
  • aedes_write_nifti.m

    r78 r80  
    1 function [done,msg] = an2_write_nifti(DATA,filename,varargin)
    2 % AN2_WRITE_NIFTI - Write data in NIfTI or Analyze 7.5 formats
     1function [done,msg] = aedes_write_nifti(DATA,filename,varargin)
     2% AEDES_WRITE_NIFTI - Write data in NIfTI or Analyze 7.5 formats
    33%   
    44%
    55% Synopsis:
    6 %       [done,msg] = an2_write_nifti(DATA,filename,prop1,value1,prop2,value2,...);
     6%       [done,msg] = aedes_write_nifti(DATA,filename,prop1,value1,prop2,value2,...);
    77%
    88% Description:
     
    7676%
    7777% Examples:
    78 %       DATA = an2_readfid('testi.fid');
     78%       DATA = aedes_readfid('testi.fid');
    7979%
    8080%       % Write one file NIfTI
    81 %       an2_write_nifti(DATA,'testi.nii');
     81%       aedes_write_nifti(DATA,'testi.nii');
    8282%
    8383%       % Write two file NIfTI
    84 %       an2_write_nifti(DATA,'testi.img','FileType',1)
     84%       aedes_write_nifti(DATA,'testi.img','FileType',1)
    8585%
    8686%       % Write Analyze 7.5 *.hdr and *.img files
    87 %       an2_write_nifti(DATA,'testi.img','FileType',0)
     87%       aedes_write_nifti(DATA,'testi.img','FileType',0)
    8888%       
    8989% See also:
    90 %       AEDES, AN2_READ_NIFTI
     90%       AEDES, AEDES_READ_NIFTI
    9191
    9292%       Acknowledgment: This function is modified under GNU license from
  • misclib/addicon.m

    r45 r80  
    3030
    3131% Load icon cdata
    32 S=load('an2_cdata.mat');
     32S=load('aedes_cdata.mat');
    3333cdata = S.cdata;
    3434 
  • misclib/filter_fmri_data.m

    r37 r80  
    2525
    2626% Read the data
    27 data = an2_read_nifti(infile);
     27data = aedes_read_nifti(infile);
    2828if length(size(data.FTDATA))<4
    2929  error('Input data has to be 4D data!')
     
    4242
    4343% Waitbar
    44 wbh=an2_wbar(0,'Filtering image data...');
     44wbh=aedes_wbar(0,'Filtering image data...');
    4545
    4646counter=1;
     
    5252          tmp = squeeze(double(data.FTDATA(ii,kk,zz,:)));
    5353          data.FTDATA(ii,kk,zz,:) = filtfilt(B_lo,A_lo,filtfilt(B_hi,A_hi,tmp))+mean(tmp);
    54           an2_wbar(counter/nVox,wbh)
     54          aedes_wbar(counter/nVox,wbh)
    5555          counter=counter+1;
    5656        end
     
    6161
    6262% Write new 4D NIfTI  image
    63 cwh = an2_calc_wait(sprintf('Writing 4D NIfTI file:\n%s',outfile));
    64 an2_write_nifti(data,outfile);
     63cwh = aedes_calc_wait(sprintf('Writing 4D NIfTI file:\n%s',outfile));
     64aedes_write_nifti(data,outfile);
    6565delete(cwh)
    6666
  • misclib/fmri_analysis.m

    r75 r80  
    225225if all(smooth_kernel)
    226226  if show_wbar
    227     wbh = an2_calc_wait('Smoothing data...');
     227    wbh = aedes_calc_wait('Smoothing data...');
    228228    drawnow
    229229  end
     
    260260end
    261261if show_wbar
    262   wbh = an2_wbar(0,sprintf('Estimating parameters. Processing plane 0/%d',nPlanes));
     262  wbh = aedes_wbar(0,sprintf('Estimating parameters. Processing plane 0/%d',nPlanes));
    263263  drawnow
    264264end
     
    268268  for kk=1:nCols
    269269    if show_wbar
    270       an2_wbar(ii/nPlanes,wbh,sprintf('Estimating parameters. Processing plane %d/%d, column %d/%d',ii,nPlanes,kk,nCols));
     270      aedes_wbar(ii/nPlanes,wbh,sprintf('Estimating parameters. Processing plane %d/%d, column %d/%d',ii,nPlanes,kk,nCols));
    271271    end
    272272    col_data = squeeze(smooth_data(:,kk,ii,:)).';
     
    291291
    292292if show_wbar
    293   wbh = an2_calc_wait('Calculating threshold...');
     293  wbh = aedes_calc_wait('Calculating threshold...');
    294294  drawnow
    295295end
  • misclib/fmri_blob_overlay.m

    r61 r80  
    128128  ImBlob = ImBlob.FTDATA;
    129129elseif ischar(ImBlob)
    130   data = an2_data_read(ImBlob);
     130  data = aedes_data_read(ImBlob);
    131131  ImBlob = double(data.FTDATA);
    132132  clear data;
     
    137137  ImAnat = ImAnat.FTDATA;
    138138elseif ischar(ImAnat)
    139   data = an2_data_read(ImAnat);
     139  data = aedes_data_read(ImAnat);
    140140  ImAnat = data.FTDATA;
    141141  clear data;
  • misclib/fmri_corr.m

    r73 r80  
    44
    55if ischar(data)
    6   data=an2_data_read(data);
     6  data=aedes_data_read(data);
    77  data = data.FTDATA;
    88elseif isstruct(data)
  • misclib/fmri_filter.m

    r75 r80  
    4040  data = data.FTDATA;
    4141elseif ischar(data)
    42   data = an2_data_read(data);
     42  data = aedes_data_read(data);
    4343  data = data.FTDATA;
    4444end
     
    8080 
    8181  % Waitbar
    82   wbh=an2_wbar(0,'Filtering image data...');
     82  wbh=aedes_wbar(0,'Filtering image data...');
    8383 
    8484  counter=1;
     
    109109                end
    110110                filtered_data(ii,kk,zz,:) = tmp;
    111                 an2_wbar(counter/nVox,wbh)
     111                aedes_wbar(counter/nVox,wbh)
    112112                counter=counter+1;
    113113          end
     
    123123% Write output to file
    124124if ~isempty(out_file)
    125   an2_write_nifti(filtered_data,out_file);
     125  aedes_write_nifti(filtered_data,out_file);
    126126end
    127127
  • misclib/fmri_smooth.m

    r63 r80  
    1717  data = data.FTDATA;
    1818elseif ischar(data)
    19   data = an2_data_read(data);
     19  data = aedes_data_read(data);
    2020  data = data.FTDATA;
    2121end
     
    7979% Write output files
    8080if writeSmoothedData
    81   an2_write_nifti(smooth_data,out_file)
     81  aedes_write_nifti(smooth_data,out_file)
    8282end
  • misclib/fmri_spm_volumes.m

    r62 r80  
    6363
    6464% Read the fMRI data
    65 data = an2_readfid(infile,'FastRead','on');
     65data = aedes_readfid(infile,'FastRead','on');
    6666if isempty(data)
    6767  disp('FMRI_SPM_VOLUMES: Action canceled...')
     
    9898nVols = length(StartVolume:EndVolume);
    9999
    100 wbh = an2_wbar(0,['Writing volumes...']);
     100wbh = aedes_wbar(0,['Writing volumes...']);
    101101
    102102% Write output images
     
    105105  count=count+1;
    106106 
    107   an2_wbar(count/nVols,wbh,'Writing volumes...');
     107  aedes_wbar(count/nVols,wbh,'Writing volumes...');
    108108 
    109109  % Check if volume should be omitted
     
    117117  % Rotate and flip volumes VNMR EPI and RASER to right orientations
    118118  if isEPI
    119     vol = flipdim(an2_rot3d(vol,1,3),2);
     119    vol = flipdim(aedes_rot3d(vol,1,3),2);
    120120  elseif isRASER
    121121    vol = flipdim(vol,2);
     
    126126 
    127127  % Write the NIfTI file
    128   done=an2_write_nifti(vol,[outdir,fname],...
     128  done=aedes_write_nifti(vol,[outdir,fname],...
    129129    'VoxelSize',VoxelSize,...
    130130    'XYZUnits',XYZUnits,...
  • misclib/makelcmraw.m

    r45 r80  
    3333if nargin==0
    3434  %% Ask for a file
    35   [DATA,msg] = an2_readfid('','return',3);
     35  [DATA,msg] = aedes_readfid('','return',3);
    3636  if isempty(DATA)
    3737    error(msg)
  • misclib/nifti3dto4d.m

    r66 r80  
    3636if nargin==0 || isempty(infiles)
    3737  % Prompt files to read
    38   [fname,fpath,findex] = an2_juigetfiles({'*.nii','NIfTI files (*.nii)';...
     38  [fname,fpath,findex] = aedes_juigetfiles({'*.nii','NIfTI files (*.nii)';...
    3939        '*.*','All Files (*.*)'},'Select volumes',pwd);
    4040 
     
    6363
    6464% Read the first image and get header parameters
    65 tmp_data = an2_read_nifti(infiles{1});
     65tmp_data = aedes_read_nifti(infiles{1});
    6666TimeUnits = tmp_data.HDR.timeunits;
    6767xyzunits = tmp_data.HDR.xyzunits;
     
    108108
    109109if showWbar
    110   wbh=an2_wbar(1/length(infiles),...
     110  wbh=aedes_wbar(1/length(infiles),...
    111111        sprintf('Reading 3D NIfTI files...1/%d',length(infiles)));
    112112end
    113113for ii=2:length(infiles)
    114114  % Read the nifti file
    115   tmp_data = an2_read_nifti(infiles{ii});
     115  tmp_data = aedes_read_nifti(infiles{ii});
    116116  sz(1)=size(tmp_data.FTDATA,1);
    117117  sz(2)=size(tmp_data.FTDATA,2);
     
    122122  DATA.FTDATA(:,:,:,ii) = tmp_data.FTDATA;
    123123  if showWbar
    124         an2_wbar(ii/length(infiles),wbh,...
     124        aedes_wbar(ii/length(infiles),wbh,...
    125125          sprintf('Reading 3D NIfTI files...%d/%d',ii,length(infiles)))
    126126  end
     
    154154% Write the resulting 4D NIfTI file
    155155if showWbar
    156   cwh = an2_calc_wait(sprintf('Writing 4D NIfTI file:\n%s',outfile));
     156  cwh = aedes_calc_wait(sprintf('Writing 4D NIfTI file:\n%s',outfile));
    157157end
    158 an2_write_nifti(DATA,outfile,...
     158aedes_write_nifti(DATA,outfile,...
    159159  'VoxelSize',vox_size,...
    160160  'XYZUnits',xyzunits,...
  • misclib/nifti4dto3d.m

    r53 r80  
    6161
    6262% Read the 4D NIfTI file
    63 DATA = an2_read_nifti(infile);
     63DATA = aedes_read_nifti(infile);
    6464nVol = size(DATA.FTDATA,4);
    6565
     
    7171% Write new 3D NIfTI volumes
    7272if showWbar
    73   wbh=an2_wbar(1/nVol,...
     73  wbh=aedes_wbar(1/nVol,...
    7474        sprintf('Writing 3D NIfTI files...1/%d',nVol));
    7575end
     
    8282  tmp_data.FTDATA = DATA.FTDATA(:,:,:,ii);
    8383  tmp_data.HDR.FileHeader = FileHeader;
    84   done=an2_write_nifti(tmp_data,filename);
     84  done=aedes_write_nifti(tmp_data,filename);
    8585 
    8686  if ~done
     
    8989 
    9090  if showWbar
    91         an2_wbar(ii/nVol,wbh,...
     91        aedes_wbar(ii/nVol,wbh,...
    9292          sprintf('Writing 3D NIfTI files...%d/%d',ii,nVol))
    9393  end
  • misclib/spectrsum.m

    r45 r80  
    2727
    2828if nargin==0
    29   DATA = an2_readfid('','return',3);
     29  DATA = aedes_readfid('','return',3);
    3030  if isempty(DATA)
    3131    % Canceled
  • plugins/calc_asl_cbf.m

    r52 r80  
    6262
    6363% Ask for lambda
    64 resp = an2_inputdlg('Lambda coefficient?','Lambda coefficient?',...
     64resp = aedes_inputdlg('Lambda coefficient?','Lambda coefficient?',...
    6565  num2str(lambda));
    6666if isempty(resp)
     
    8686elseif strcmpi(resp,'Use constant T1')
    8787  % Ask for T1 value
    88   resp = an2_inputdlg('Input T1 value','Input T1 value',...
     88  resp = aedes_inputdlg('Input T1 value','Input T1 value',...
    8989        num2str(t1map));
    9090  if isempty(resp)
  • plugins/map_plugins/t1_3_parameter_fit.m

    r78 r80  
    2626
    2727
    28 resp = an2_inputdlg('Type fit values','Input dialog',...
     28resp = aedes_inputdlg('Type fit values','Input dialog',...
    2929  {mat2str(fit_vals)});
    3030if isempty(resp)
     
    4848[fp,fn,fe]=fileparts([fpath,fname]);
    4949try
    50   an2_fitmaps(DATA,'T1_3P',fit_vals,'FileName',[fp,filesep,fn]);
     50  aedes_fitmaps(DATA,'T1_3P',fit_vals,'FileName',[fp,filesep,fn]);
    5151catch
    5252  errordlg({'Could not calculate T1 3P maps. The following error was returned',...
  • plugins/map_plugins/t1_inversion_recovery.m

    r78 r80  
    2626
    2727
    28 resp = an2_inputdlg('Type TI values','Input dialog',...
     28resp = aedes_inputdlg('Type TI values','Input dialog',...
    2929  {mat2str(fit_vals)});
    3030if isempty(resp)
     
    4848[fp,fn,fe]=fileparts([fpath,fname]);
    4949try
    50   an2_fitmaps(DATA,'T1_IR',fit_vals,'FileName',[fp,filesep,fn]);
     50  aedes_fitmaps(DATA,'T1_IR',fit_vals,'FileName',[fp,filesep,fn]);
    5151catch
    5252  errordlg({'Could not calculate T1 IR maps. The following error was returned',...
  • plugins/map_plugins/t1_rho.m

    r78 r80  
    3131end
    3232
    33 resp = an2_inputdlg('Type spin-lock values');
     33resp = aedes_inputdlg('Type spin-lock values');
    3434if isempty(resp)
    3535  return
     
    5353[fp,fn,fe]=fileparts([fpath,fname]);
    5454try
    55   an2_fitmaps(DATA,'t1r',fit_vals,'FileName',[fp,filesep,fn]);
     55  aedes_fitmaps(DATA,'t1r',fit_vals,'FileName',[fp,filesep,fn]);
    5656catch
    5757  errordlg({'Could not calculate T1 rho maps. The following error was returned',...
  • plugins/map_plugins/t1_saturation_recovery.m

    r78 r80  
    2626
    2727
    28 resp = an2_inputdlg('Type fit values','Input dialog',...
     28resp = aedes_inputdlg('Type fit values','Input dialog',...
    2929  {mat2str(fit_vals)});
    3030if isempty(resp)
     
    4848[fp,fn,fe]=fileparts([fpath,fname]);
    4949try
    50   an2_fitmaps(DATA,'T1_SR',fit_vals,'FileName',[fp,filesep,fn]);
     50  aedes_fitmaps(DATA,'T1_SR',fit_vals,'FileName',[fp,filesep,fn]);
    5151catch
    5252  errordlg({'Could not calculate T1 SR maps. The following error was returned',...
  • plugins/map_plugins/t2.m

    r78 r80  
    4040
    4141
    42 resp = an2_inputdlg('Type TE values','Input dialog',...
     42resp = aedes_inputdlg('Type TE values','Input dialog',...
    4343  {mat2str(fit_vals)});
    4444if isempty(resp)
     
    6262[fp,fn,fe]=fileparts([fpath,fname]);
    6363try
    64   an2_fitmaps(DATA,'t2',fit_vals,'FileName',[fp,filesep,fn]);
     64  aedes_fitmaps(DATA,'t2',fit_vals,'FileName',[fp,filesep,fn]);
    6565catch
    6666  errordlg({'Could not calculate T2 maps. The following error was returned',...
  • plugins/map_plugins/t2_rho.m

    r78 r80  
    3131end
    3232
    33 resp = an2_inputdlg('Type spin-lock values');
     33resp = aedes_inputdlg('Type spin-lock values');
    3434if isempty(resp)
    3535  return
     
    5353[fp,fn,fe]=fileparts([fpath,fname]);
    5454try
    55   an2_fitmaps(DATA,'t2r',fit_vals,'FileName',[fp,filesep,fn]);
     55  aedes_fitmaps(DATA,'t2r',fit_vals,'FileName',[fp,filesep,fn]);
    5656catch
    5757  errordlg({'Could not calculate T2 rho maps. The following error was returned',...
  • plugins/save_roi_as_mask.m

    r45 r80  
    8181  DATA{1}.FTDATA=data;
    8282  datatype = 'uint8';
    83   [done,msg]=an2_write_nifti(DATA{1},filename,...
     83  [done,msg]=aedes_write_nifti(DATA{1},filename,...
    8484        'DataType',datatype);
    8585else
    86   [done,msg]=an2_write_nifti(data,filename,...
     86  [done,msg]=aedes_write_nifti(data,filename,...
    8787        'VoxelSize',voxelsize,'XYZUnits',xyzunits,...
    8888        'TimeUnits',timeunits);
  • plugins/view_kspace.m

    r74 r80  
    8686 
    8787  %% Read K-space
    88   [tmp,msg]=an2_readfid([fpath,fname],'return',2,...
    89     'FastRead','on','ReorientEPI','on');
     88  [tmp,msg]=aedes_readfid([fpath,fname],'return',2,...
     89    'FastRead','on','OrientImages','on');
    9090  if isempty(tmp)
    9191    if iscell(msg)
  • plugins/write_difference_images.m

    r45 r80  
    4444 
    4545  % write *.nii files
    46   h=an2_wbar(0,sprintf('Writing File...\n%s',' '));
     46  h=aedes_wbar(0,sprintf('Writing File...\n%s',' '));
    4747  for ii=1:length(data_new)
    48         an2_wbar(ii/length(data_new),h,...
     48        aedes_wbar(ii/length(data_new),h,...
    4949          sprintf('Writing File...\n%s',[dirname,fnames{ii}]))
    50         an2_write_nifti(data_new{ii},[dirname,fnames{ii}]);
     50        aedes_write_nifti(data_new{ii},[dirname,fnames{ii}]);
    5151  end
    5252  delete(h)
Note: See TracChangeset for help on using the changeset viewer.

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