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: patchMerge3DProcessGUI.m
    path of file: ./repos/u-shape3D/software
    
    the code of the file until where you have to start completion: function varargout = patchMerge3DProcessGUI(varargin)
% patchmerge3dprocessgui M-file for patchmerge3dprocessgui.fig
%      patchmerge3dprocessgui, by itself, creates a new patchmerge3dprocessgui or raises the existing
%      singleton*.
%
%      H = patchmerge3dp
    
function popupmenu_CurrentChannel_Callback(hObject, eventdata, handles)
% hObject    handle to popupmenu_CurrentChannel (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns popupmenu_CurrentChannel contents as cell array
%        contents{get(hObject,'Value')} returns selected item from popupmenu_CurrentChannel
userData=get(handles.figure1,'UserData');
funParams = get(handles.popupmenu_CurrentChannel,'UserData');

selChan = 1:numel(userData.MD.channels_);%For now just let them set parameters for all channels.
%selChan = get(handles.listbox_selectedChannels,'UserData');
chanStr = arrayfun(@(x)(['Channel ' num2str(x)]),selChan,'Unif',0);
set(handles.popupmenu_CurrentChannel,'String',chanStr);
iChan = get(handles.popupmenu_CurrentChannel,'Value');
%set(handles.popupmenu_CurrentChannel,'UserData',iChan);

% set(handles.popupmenu_deconMode, 'String', {'weiner','richLucy'},...
%      'Value', find(ismember(funParams.deconMode,{'weiner','richLucy'})))

% Set-up parameters
for i =1 : numel(funParams.PerChannelParams)
    paramName = funParams.PerChannelParams{i};
    parVal = funParams.(paramName)(iChan);
    if islogical(funParams.(paramName)) || strcmp(get(handles.(['edit_' paramName]),'Style'),'checkbox')
         set(handles.(['edit_' paramName]), 'Value', parVal);
    elseif iscell(funParams.(paramName))   
        set(handles.(['edit_' paramName]), 'String', parVal{:});
    else
        set(handles.(['edit_' paramName]), 'String', parVal);
    end