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: imageCluster.m
    path of file: ./repos/CanlabCore/CanlabCore/Visualization_functions
    
    the code of the file until where you have to start completion: function [out,cl] = imageCluster(varargin)
% :Usage:
% ::
%
%    [out,cl] = imageCluster(arguments as specified below)
%
% Images a cluster isosurface on an existing 3D head or brain plot
%
% works with tsu (Talairach Space Utility) main window as current figure
% old: clusters = getappdata(gcf, 'clusters');
% 
% Inputs (in any order): keyword followed by input argument
%
%   **'cluster':**
%        followed by cluster to image, from SPM or TSU.
%
%   **'getclusters':**
%        no other args necessary - starts gui for cluster selection
%        function returns all clusters.  select with clusters(i)
%
%   **'getfigclusters':**
%        get clusters from TSU main figure.  must be current figure.
%
%   **'figure':**
%        create a new figure to image color on
%
%   **'color':**
%        followed by color value - either text or vector
%
%   **'alpha':**
%        followed by transparency value for cluster surface, 0-1
%        1 is opaque, 0 is completely transparent
% 
% :Control of smoothing:
%
%   **'heightthresh':**
%        followed by cutoff threshold post-smooth, in percentage of min Z value in cl
%          - enter a number between 0 and 1
%
%   **'fwhm':**
%        followed by smoothing kernel FWHM (Gaussian)
%

    
function [out,cl] = imageCluster(varargin)
% :Usage:
% ::
%
%    [out,cl] = imageCluster(arguments as specified below)
%
% Images a cluster isosurface on an existing 3D head or brain plot
%
% works with tsu (Talairach Space Utility) main window as current figure
% old: clusters = getappdata(gcf, 'clusters');
% 
% Inputs (in any order): keyword followed by input argument
%
%   **'cluster':**
%        followed by cluster to image, from SPM or TSU.
%
%   **'getclusters':**
%        no other args necessary - starts gui for cluster selection
%        function returns all clusters.  select with clusters(i)
%
%   **'getfigclusters':**
%        get clusters from TSU main figure.  must be current figure.
%
%   **'figure':**
%        create a new figure to image color on
%
%   **'color':**
%        followed by color value - either text or vector
%
%   **'alpha':**
%        followed by transparency value for cluster surface, 0-1
%        1 is opaque, 0 is completely transparent
% 
% :Control of smoothing:
%
%   **'heightthresh':**
%        followed by cutoff threshold post-smooth, in percentage of min Z value in cl
%          - enter a number between 0 and 1
%
%   **'fwhm':**
%        followed by smoothing kernel FWHM (Gaussian)
%
%   **'kernelsize':**
%        followed by box size for kernel support (5 5 5 is  default)
%
% :Outputs:
%
%   **out:**
%        Patch handle
%
%   **cl:**
%        cluster struct
%
% :Uses: cl.XYZmm and cl.voxSize
%
% Works in Matlab 5.3, but with no transparency.
%
% :Example:
% ::
%
%    p(i) = imageCluster('cluster',region2struct(r(i)),'color',colors{i},'alpha',1, 'fwhm', 1.2, 'heightthresh', .3); 
%    view(135, 30); lighting gouraud; lightRestoreSingle; axis image; camlight right;
%
% ..
%    By Tor Wager, 10/3/2001, edited 7/2012.  1/18: removed verbose
%    printout
% ..

% ..
%    Set up arguments and default values
% ..
out = [];
clusters = [];
mycolor = 'y';
myalpha = 1;
heightthresh = .5;
fwhm = 1;
kernelsize = [5 5 5];

for i = 1:nargin
    if isstr(varargin{i})
        switch varargin{i}
        case 'cluster', cl = varargin{i+1};
        case 'getclusters', clusters = tor_ihb_GetClusters;
        case 'getfigclusters', clusters = getappdata(gcf, 'clusters');
        case 'figure', h3dfig = figure; set(h3dfig,'Tag','myFig');
        case 'color',mycolor = varargin{i+1};
        case 'alpha',myalpha = varargin{i+1};
            
            case 'heightthresh', heightthresh = varargin{i+1};
            case {'fwhm', 'sd'}, fwhm = varargin{i+1};
            case {'kernelsize', 'smoothbox'}, kernelsize = varargin{i+1};
                
        end