function vbm(varargin)
% vbm.m - interface for performing vbm preprocessing tasks.
% Jan 10 2005. 
% Please note, this can be setup to run over Sun Grid Engine.  (SGE)
% By default SGE mode is disabled, but you can
% un-comment line 12 in vbm.m to allow SGE mode to be used.
% 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. 

spm_defaults;
global defaults
if ~nargin
    sge=0;%
    % Uncomment the next line to allow SGE mode to be used.
    % sge = spm_input('Run over SGE?','+1','m','YES|NO',[1 0], 1);
    switch sge
        case 1
            vbm_ui('sge');
        case 0
            vbm_ui;
        otherwise
            error('unknown input')
    end
else
    vbm_ui(varargin);
end