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: convertMNI2FSWithMask.m
    path of file: ./repos/brainSurfer/scripts/import
    
    the code of the file until where you have to start completion: function [outFiles] = convertMNI2FSWithMask(inFile)
% This function creates a mask of empty intensities in inFile and projects
% it into surface space in order to threshold the surface based projection
% of inFile.
%
% A problem for projecting your data into surface space is that it might
% already be thresholded in volume space. Because projection requires
% downsampling, some vertices will invariably map onto both voxels that are
% below the threshold (i.e., empty in volume space) and above threshold.
% This may result in vertices being assigned average intensities that are
% below the actual threshold value that was used to constrain the data in
% volume space.
%
% To project thresholded data into surface space, this script takes inFile
% and creates two masks, one of the empty voxels (i.e., zeros) and one of
% voxels with some intensity. It projects both binary masks onto surface
% space. In surface space, a value closer to 1 for each of these masks
% represents vertices whose associated group of voxels is comprised of a
% greater proportion of 1s. A new mask is constructed for all vertices
% where more voxels are associated with the mask of empty voxels than the
% mask of non-empty voxels. Finally, the script projects the original data
% in inFile into surface space and removes all vertices that are in this
% mask. 
%

    
function [outFiles] = convertMNI2FSWithMask(inFile)
% This function creates a mask of empty intensities in inFile and projects
% it into surface space in order to threshold the surface based projection
% of inFile.
%
% A problem for projecting your data into surface space is that it might
% already be thresholded in volume space. Because projection requires
% downsampling, some vertices will invariably map onto both voxels that are
% below the threshold (i.e., empty in volume space) and above threshold.
% This may result in vertices being assigned average intensities that are
% below the actual threshold value that was used to constrain the data in
% volume space.
%
% To project thresholded data into surface space, this script takes inFile
% and creates two masks, one of the empty voxels (i.e., zeros) and one of
% voxels with some intensity. It projects both binary masks onto surface
% space. In surface space, a value closer to 1 for each of these masks
% represents vertices whose associated group of voxels is comprised of a
% greater proportion of 1s. A new mask is constructed for all vertices
% where more voxels are associated with the mask of empty voxels than the
% mask of non-empty voxels. Finally, the script projects the original data
% in inFile into surface space and removes all vertices that are in this
% mask. 
%
% Alex Teghipco // ateghipc@uci.edu // 10/23/18

% defaults
if ispc == 0
    slash = '/';
else
    slash = '\';
end