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: deconvolveMovieMD.m
    path of file: ./repos/u-shape3D/software
    
    the code of the file until where you have to start completion: function deconvolveMovieMD(processOrMovieData, varargin)

% deconvolveMovieMD - deconvolves a MovieData object
%
%% INPUTS:
%
% processOrMovieData - a MovieData object or process that will be deconvolved
%
% p.OutputDirectory - directory where the deconvolved images will be saved
%
% p.chanList     - a list of the channels that will be analyzed 
% 
% p.deconMode       - type of deconvolution performed
%    'weiner'       - weiner deconvolution
%    'richLucy'     - Richardson-Lucy deconvolution
%    'blind'        - blind deconvolution   
%
% p.weinerAuto      - 1 if the Weiner parameter is automatically calculated, 
%                     and 0 otherwise
%
% p.weiner          - the value of the weiner parameter. This is ignored if 
%                     weinerAuto is set to 1
% 
% p.apoHeight       - the value of the apodization height in the Weiner
%                     deconvolution
%
% p.richLucyIter    - number of iteration of the Richardson-lucy
%                     deconvolution performed
%
% p.apodizeRL       - set to to 1 to apodize the Richardson-Lucy deconvolution
%
% p.saveNotApodized - set to 1, to save a non-apodized image (will only
%                     save in RL mode if apodization is turned on)
%
% p.pathDeconPSF    - the path of the saved psf for deconvolution 
%                     (see note below)
%
% p.pathApoPSF      - the path of the saved psf for apodization 
%                     (see note below)
%
% p.usePhotobleach  - set to 1 to load photobleach corrected images
%
% Note: the PSF must be saved in a .mat file at the path specified by 
% pathPSF.  The PSF is assumed to be a variable named PSF whose dimensions
% are in the order (x,y,z). maxOTF, the second largest OTF value in the fft 
% of the full size PSF, is also assumed to be saved in this mat file.
%
%
% Copyright (C) 2024, Danuser Lab - UTSouthwestern 
%
% This file is part of Morphology3DPackage.
% 
% Morphology3DPackage is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
% 
% Morphology3DPackage is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
% 
% You should have received a copy of the GNU General Public License
% along with Morphology3DPackage.  If not, see <http://www.gnu.org/licenses/>.
% 
% 


% Define additional parameters 
% segmentation parameters (only used if measureWeiner is enabled) 
% These are hardcoded but you probably don't want to change them.
imageBlurWeiner = 1; % the standard deviation in pixels of the gaussian that the image is blurred with prior to segmentation
morphRadiusErode = 3; %5 shrinks the estimated boundary by this number of pixels before measuring the mean signal
morphRadiusDilate = 10; %5 expands the estimated boundary by this number of pixels before measuring the noise variance %20

% save parameters
imageMultiply = 400; % multiply the deconvolved image by a number to improve the dynamic range of the saved images

%% Check input
ip = inputParser;
ip.CaseSensitive = false;
ip.addRequired('movieData', @(x) isa(x,'Process') && isa(x.getOwner(),'MovieData') || isa(x,'MovieData'));
ip.addOptional('paramsIn',[], @isstruct);
ip.addParameter('ProcessIndex',[],@isnumeric);
ip.parse(processOrMovieData,varargin{:});

    
function deconvolveMovieMD(processOrMovieData, varargin)

% deconvolveMovieMD - deconvolves a MovieData object
%
%% INPUTS:
%
% processOrMovieData - a MovieData object or process that will be deconvolved
%
% p.OutputDirectory - directory where the deconvolved images will be saved
%
% p.chanList     - a list of the channels that will be analyzed 
% 
% p.deconMode       - type of deconvolution performed
%    'weiner'       - weiner deconvolution
%    'richLucy'     - Richardson-Lucy deconvolution
%    'blind'        - blind deconvolution   
%
% p.weinerAuto      - 1 if the Weiner parameter is automatically calculated, 
%                     and 0 otherwise
%
% p.weiner          - the value of the weiner parameter. This is ignored if 
%                     weinerAuto is set to 1
% 
% p.apoHeight       - the value of the apodization height in the Weiner
%                     deconvolution
%
% p.richLucyIter    - number of iteration of the Richardson-lucy
%                     deconvolution performed
%
% p.apodizeRL       - set to to 1 to apodize the Richardson-Lucy deconvolution
%
% p.saveNotApodized - set to 1, to save a non-apodized image (will only
%                     save in RL mode if apodization is turned on)
%
% p.pathDeconPSF    - the path of the saved psf for deconvolution 
%                     (see note below)
%
% p.pathApoPSF      - the path of the saved psf for apodization 
%                     (see note below)
%
% p.usePhotobleach  - set to 1 to load photobleach corrected images
%
% Note: the PSF must be saved in a .mat file at the path specified by 
% pathPSF.  The PSF is assumed to be a variable named PSF whose dimensions
% are in the order (x,y,z). maxOTF, the second largest OTF value in the fft 
% of the full size PSF, is also assumed to be saved in this mat file.
%
%
% Copyright (C) 2024, Danuser Lab - UTSouthwestern 
%
% This file is part of Morphology3DPackage.
% 
% Morphology3DPackage is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
% 
% Morphology3DPackage is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
% 
% You should have received a copy of the GNU General Public License
% along with Morphology3DPackage.  If not, see <http://www.gnu.org/licenses/>.
% 
% 


% Define additional parameters 
% segmentation parameters (only used if measureWeiner is enabled) 
% These are hardcoded but you probably don't want to change them.
imageBlurWeiner = 1; % the standard deviation in pixels of the gaussian that the image is blurred with prior to segmentation
morphRadiusErode = 3; %5 shrinks the estimated boundary by this number of pixels before measuring the mean signal
morphRadiusDilate = 10; %5 expands the estimated boundary by this number of pixels before measuring the noise variance %20

% save parameters
imageMultiply = 400; % multiply the deconvolved image by a number to improve the dynamic range of the saved images

%% Check input
ip = inputParser;
ip.CaseSensitive = false;
ip.addRequired('movieData', @(x) isa(x,'Process') && isa(x.getOwner(),'MovieData') || isa(x,'MovieData'));
ip.addOptional('paramsIn',[], @isstruct);
ip.addParameter('ProcessIndex',[],@isnumeric);
ip.parse(processOrMovieData,varargin{:});
paramsIn = ip.Results.paramsIn;

[MD, process] = getOwnerAndProcess(processOrMovieData,'Deconvolution3DProcess',true);
p = parseProcessParams(process, paramsIn);

% interpret the channels parameter
if ischar(p.channels) && strcmp(p.channels, 'all')
    p.chanList = 1:length(MD.channels_);
elseif isnumeric(p.channels)
    p.chanList = p.channels;
else
    p.chanList = p.ChannelIndex;
end