Changeset 138


Ignore:
Timestamp:
Aug 17, 2010, 12:52:55 PM (9 years ago)
Author:
tjniskan
Message:
  • Added option to VNMR preferences to use the new version of the VNMR

read function

  • Added read support for certain CINE sequences
  • Added a command line preference option for inputting data aspect

ratio manually in created mosaic images

M aedes_readfidprefs.m
M aedes_data_read.m
M aedes_readvnmr.m
M aedes_export_gui.m
M aedes_revision.m
A vnmr_recon/cine_recon.m

Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • aedes_data_read.m

    r132 r138  
    299299  OrientImages = 'on';
    300300  RemoveEPIphaseIm = 'off';
     301  VnmrUseOldReadFcn = true;
    301302 
    302303  %% Get defaults for Return
     
    375376  end
    376377 
     378  %% Get default read function
     379  if ispref('Aedes','VnmrUseOldReadFcn')
     380    VnmrUseOldReadFcn = getpref('Aedes','VnmrUseOldReadFcn');
     381  else
     382    VnmrUseOldReadFcn = true;
     383  end
     384 
     385 
    377386 
    378387  %% Read data from fid file
    379388  try
    380     DATA=aedes_readfid([f_path,'fid'],...
    381           'procpar',procpar,...
    382           'wbar',showWbar,...
    383           'Return',ReadfidReturn,...
    384           'DCcorrection',ReadfidDCcorrection,...
    385           'Zeropadding',ReadfidZeropadding,...
    386           'sorting',ReadfidSorting,...
    387           'FastRead',ReadfidFastRead,...
    388           'Precision',ReadfidPrecision,...
    389     'OrientImages',OrientImages,...
    390     'RemoveEPIphaseIm',RemoveEPIphaseIm);
     389    if VnmrUseOldReadFcn
     390      DATA=aedes_readfid([f_path,'fid'],...
     391        'procpar',procpar,...
     392        'wbar',showWbar,...
     393        'Return',ReadfidReturn,...
     394        'DCcorrection',ReadfidDCcorrection,...
     395        'Zeropadding',ReadfidZeropadding,...
     396        'sorting',ReadfidSorting,...
     397        'FastRead',ReadfidFastRead,...
     398        'Precision',ReadfidPrecision,...
     399        'OrientImages',OrientImages,...
     400        'RemoveEPIphaseIm',RemoveEPIphaseIm);
     401    else
     402      DATA=aedes_readvnmr([f_path,'fid'],...
     403        'procpar',procpar,...
     404        'wbar',showWbar,...
     405        'Return',ReadfidReturn,...
     406        'DCcorrection',ReadfidDCcorrection,...
     407        'Zeropadding',ReadfidZeropadding,...
     408        'sorting',ReadfidSorting,...
     409        'FastRead',ReadfidFastRead,...
     410        'Precision',ReadfidPrecision,...
     411        'OrientImages',OrientImages,...
     412        'RemoveEPIphaseIm',RemoveEPIphaseIm);
     413    end
    391414    if isempty(DATA)
    392415      DATA=[];
  • aedes_export_gui.m

    r126 r138  
    11001100 
    11011101 
     1102  % Look for custom aspect ratio
     1103  if ispref('Aedes','ExportMosaicUseCustomAspectRatio')
     1104    data_aspectratio = getpref('Aedes','ExportMosaicUseCustomAspectRatio');
     1105  else
     1106    data_aspectratio = [1 1 1];
     1107  end
     1108 
    11021109  %% images and axes
    11031110  count=1;
     
    11171124                'xticklabel',[],...
    11181125                'yticklabel',[],...
    1119                 'DataAspectRatio',[1 1 1],...
     1126                'DataAspectRatio',data_aspectratio,...
    11201127                'PlotBoxAspectRatio',[data_sz(2) data_sz(1) 1],...
    11211128                'PlotBoxAspectRatioMode','manual');
     
    11321139                  'xticklabel',[],...
    11331140                  'yticklabel',[],...
    1134                   'DataAspectRatio',[1 1 1],...
     1141                  'DataAspectRatio',data_aspectratio,...
    11351142                  'PlotBoxAspectRatio',[data_sz(2) data_sz(1) 1],...
    11361143                  'PlotBoxAspectRatioMode','manual');
     
    11461153                  'xticklabel',[],...
    11471154                  'yticklabel',[],...
    1148                   'DataAspectRatio',[1 1 1],...
     1155                  'DataAspectRatio',data_aspectratio,...
    11491156                  'PlotBoxAspectRatio',[data_sz(2) data_sz(1) 1],...
    11501157                  'PlotBoxAspectRatioMode','manual');
  • aedes_readfidprefs.m

    r80 r138  
    147147end
    148148
     149%% Get defaults for read function
     150if ispref('Aedes','VnmrUseOldReadFcn')
     151  if getpref('Aedes','VnmrUseOldReadFcn')
     152    Dat.VnmrUseOldReadFcn = true;
     153  else
     154    Dat.VnmrUseOldReadFcn = false;
     155  end
     156else
     157  Dat.VnmrUseOldReadFcn = true;
     158  setpref('Aedes','VnmrUseOldReadFcn',Dat.VnmrUseOldReadFcn)
     159end
     160
    149161%% Load default font and colors
    150162%FigColor=get(0,'DefaultUicontrolBackgroundcolor');
    151163GD=aedes_gui_defaults;
    152164%GD.col.mainfig = FigColor;
    153 fig_h = 280;
     165fig_h = 300;
    154166fig_w = 270;
    155167scrsz = get(0,'screensize');
     
    339351  'value',val);
    340352
     353%% Default read function
     354if Dat.VnmrUseOldReadFcn
     355  val=1;
     356else
     357  val=2;
     358end
     359tmp=get(precision_tx,'position');
     360readfcn_tx = uicontrol('parent',uipanel_h,...
     361  'units','pixel',...
     362  'position',[10 tmp(2)-tmp(4)-5 tmp(3) 20],...
     363  'style','text',...
     364  'horizontalalign','left',...
     365  'string','Read Fcn',...
     366  'backgroundcolor',GD.col.frame);
     367tmp=get(readfcn_tx,'position');
     368readfcn_popup = uicontrol('parent',uipanel_h,...
     369  'units','pixel',...
     370  'position',[tmp(1)+tmp(3)+1 tmp(2)+3 140 20],...
     371  'style','popup',...
     372  'backgroundcolor','w',...
     373  'string',{'readfid (old)','readvnmr'},...
     374  'value',val);
     375
    341376
    342377%% Reorient images according to procpar.orient
     
    346381  val=0;
    347382end
    348 tmp=get(precision_tx,'position');
     383tmp=get(readfcn_tx,'position');
    349384orient_images_chbox = uicontrol('parent',uipanel_h,...
    350385  'units','pixel',...
     
    380415H.fastread_h = fastread_popup;
    381416H.precision_h = precision_popup;
     417H.readfcn_h = readfcn_popup;
    382418H.orient_images_h = orient_images_chbox;
    383419H.removeepiphaseim_h = removeepiphaseim_chbox;
    384 
    385420set(ok_btn,'userdata',H)
    386421
     
    400435fastread_val = get(H.fastread_h,'value');
    401436precision_val = get(H.precision_h,'value');
     437readfcn_val = get(H.readfcn_h,'value');
    402438orient_images_val = get(H.orient_images_h,'value');
    403439removeepiphaseim_val = get(H.removeepiphaseim_h,'value');
     
    446482end
    447483
     484%% Read fcn
     485if readfcn_val==1
     486  setpref('Aedes','VnmrUseOldReadFcn',true)
     487else
     488  setpref('Aedes','VnmrUseOldReadFcn',false)
     489end
     490
    448491%% Orient images
    449492if orient_images_val==1
  • aedes_readvnmr.m

    r128 r138  
    511511    phasetable = {'t1',procpar.pe_table(:)};
    512512  elseif isempty(phasetable) && isfield(procpar,'pelist') && ...
    513       ~isempty(procpar.pelist) && isnumeric(procpar.pelist)
     513      ~isempty(procpar.pelist) && isnumeric(procpar.pelist) && ...
     514      length(procpar.pelist)>1
    514515    phasetable = {'t1',reshape(procpar.pelist,procpar.etl,[]).'};
    515516  end
     
    663664 
    664665  if Dat.UseCustomRecon
     666    if Dat.ShowWaitbar
     667      wbh=aedes_calc_wait(sprintf('%s\n%s',...
     668        ['Using custom function ',upper(func2str(recon_func{recon_func_ind}))],...
     669        ['to reconstruct sequence ',procpar.seqfil{1}]));
     670      drawnow
     671    end
    665672    [kspace,data,msg_out]=recon_func{recon_func_ind}(kspace,Dat,procpar);
     673    if Dat.ShowWaitbar
     674      close(wbh)
     675    end
    666676    if isempty(data) && Dat.ReturnFTData
    667677      % Fourier transform data if not done in custom reconstruction code
     
    10791089nt = procpar.nt;
    10801090nf = procpar.nf;
     1091ne = procpar.ne;
    10811092if isfield(procpar,'flash_converted')
    10821093  % Don't try to sort already sorted data...
     
    11491160    kspace = reshape(kspace,[np/2,nv,ns*ArrayLength,1,nRcvrs]);
    11501161  elseif strcmpi(seqcon(2:3),'cc')
    1151     kspace = reshape(kspace,[np/2,nv,nRcvrs,ArrayLength*ns]);
    1152     kspace = permute(kspace,[1 2 4 3]);
     1162    kspace = reshape(kspace,[np/2,ns,ArrayLength,nRcvrs,nv]);
     1163    kspace = permute(kspace,[1 5 2 3 4]);
    11531164    kspace = reshape(kspace,[np/2,nv,ns*ArrayLength,1,nRcvrs]);
    11541165  end
  • aedes_revision.m

    r137 r138  
    9393% 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 -
Note: See TracChangeset for help on using the changeset viewer.

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