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: SaveImage.m
    path of file: ./repos/ImageM/ImageM/+imagem/+actions/+file
    
    the code of the file until where you have to start completion: classdef SaveImage < imagem.actions.CurrentImageAction
% Save the current image into a file.
%
%   Class SaveImage
%
%   Example
%   SaveImage
%
%   See also
%

% ------
% Author: David Legland
% e-mail: david.legland@inra.fr
% Created: 2012-03-1
    
function run(obj, frame) %#ok<INUSL,INUSD>
        disp('Save current image');
        
        % Open dialog to save image
        [fileName, pathName] = uiputfile( ...
            {'*.gif;*.jpg;*.jpeg;*.tif;*.tiff;*.bmp;*.hdr;*.dcm;*.mhd', ...
            'All Image Files (*.tif, *.hdr, *.dcm, *.mhd, *.bmp, *.jpg)'; ...
            '*.tif;*.tiff',             'TIF Files (*.tif, *.tiff)'; ...
            '*.bmp',                    'BMP Files (*.bmp)'; ...
            '*.hdr',                    'Mayo Analyze Files (*.hdr)'; ...
            '*.dcm',                    'DICOM Files (*.dcm)'; ...
            '*.mhd;*.mha',              'MetaImage data files (*.mha, *.mhd)'; ...
            '*.*',                      'All Files (*.*)'}, ...
            'Save Image');
        
        if isequal(fileName,0) || isequal(pathName,0)
            return;
        end