function sge_vbm_ui(varargin)
% sge_vbm_ui.m - interface for performing vbm preprocessing tasks.
% Jan 10 2005. 
% SEE ALSO: make_template.m, update_template.m, vbm_mni.m, vbm_custom.m,
% vbm5.m, vbm_recover_ui.m, mls_cleanup.m
% Jan. 10, 2006
% SEE ALSO: vbm_ui.m
% Jan. 10, 2006
% Matthew L. Senjem
% Mayo Clinic 
% Senjem.Matthew1@mayo.edu
%
% When using this code, please reference the following paper:
%
% Senjem ML, Gunter JL, Shiung MM, Petersen RC, Jack CR Jr., "Comparison of different methodological implementations of voxel-based
% morphometry in neurodegenerative disease." Neuroimage. 2005 Jun;26(2):600-8. 
estimate = spm_input('What to do?',1,'m','Create template and priors|Update template and priors|Run VBM with MNI template|VBM with Custom template|Warp fluid to Custom template|VBM2custom template + other images|Delete old images',[1 2 3 4 5 6 7], 4);%Create Template AND use it to run VBM|Recover crashed session
%syscall =    'source /usr/local/sge/default/common/settings.sh';
%system(syscall);
switch estimate
    case 1
        %error('not yet implemented')
        make_template('sge');
    case 2
        update_template('sge');
    case 3
        vbm_mni('sge');
    case 4
        vbm_custom('sge');
    case 5
        vbm_custom2('sge');
        %error('not yet implemented')
        %vbm5(varargin{1});
    case 6
        vbm_custom3('sge');
    case 7
        mls_cleanup;
    otherwise
        error('unknown input')
end

  
