You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: spm_bms_display.m
    path of file: ./repos/bspm/thirdparty/spm12
    
    the code of the file until where you have to start completion: function varargout = spm_bms_display(BMS,action)
% Display results from BMS Maps
% FORMAT spm_bms_display(BMS,action)
%
% Input:
% BMS    - BMS containing details of excursion set
% action - 'Init' (Initialise)
%          'do_plot' (plot voxel results)
%          'save' (save results as NIfTI image)
%          'overlays' (options overlays menu)
%__________________________________________________________________________
% Copyright (C) 2009-2012 Wellcome Trust Centre for Neuroimaging

% Maria Joao Rosa
% $Id: spm_bms_display.m 6038 2014-06-04 15:22:42Z will $


% Main options (action)
% =========================================================================
switch action
    
    % Inititalise - action: 'Init'
    % =====================================================================
    case 'Init'


    
function varargout = spm_bms_display(BMS,action)
% Display results from BMS Maps
% FORMAT spm_bms_display(BMS,action)
%
% Input:
% BMS    - BMS containing details of excursion set
% action - 'Init' (Initialise)
%          'do_plot' (plot voxel results)
%          'save' (save results as NIfTI image)
%          'overlays' (options overlays menu)
%__________________________________________________________________________
% Copyright (C) 2009-2012 Wellcome Trust Centre for Neuroimaging

% Maria Joao Rosa
% $Id: spm_bms_display.m 6038 2014-06-04 15:22:42Z will $


% Main options (action)
% =========================================================================
switch action
    
    % Inititalise - action: 'Init'
    % =====================================================================
    case 'Init'

    % Initialise variables
    % ---------------------------------------------------------------------
    xSPM  = BMS.xSPM; 
    M     = xSPM.xVol.M;
    iM    = xSPM.iM;
    DIM   = xSPM.xVol.DIM;
    
    try
        if strcmp(spm('CheckModality'),'EEG')
            datatype = {...
                'Volumetric (2D/3D)',...
                'Scalp-Time',...
                'Scalp-Frequency',...
                'Time-Frequency',...
                'Frequency-Frequency'};
            selected = spm_input('Data Type: ','+1','m',datatype);
            datatype = datatype{selected};
        else
            datatype = 'Volumetric (2D/3D)';
        end