Changeset 80 for aedes_data_read.m


Ignore:
Timestamp:
Feb 20, 2009, 3:06:07 PM (10 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

File:
1 moved

Legend:

Unmodified
Added
Removed
  • 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};
Note: See TracChangeset for help on using the changeset viewer.

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