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: TiffImagesReader.m
    path of file: ./repos/u-shape3D/software/@TiffImagesReader
    
    the code of the file until where you have to start completion: classdef  TiffImagesReader < TiffSeriesReader
    % TiffImagesReader reads tiff images containing a single imFolder.
    % TiffImagesReader is a reader for ImageData AND ImFolder, it inherits properties
    % and methods from its superclasses, TiffSeriesReader and Reader, but
    % overwrites some methods in its superclasses to fit the special needs
    % f
    
function filenames = getImageFileNames(obj, iImFol, iImage)
            % QZ to overwrite TiffSeriesReader.getImageFileNames
            % Allow filenames to be overwritable.
            
            obj.checkPath(iImFol);
            [files, nofExt] = imDir(obj.paths{iImFol}, true);
            assert(nofExt~=0,['No proper image files are detected in:'...
                '\n\n%s\n\nValid image file extension: tif, TIF, STK, bmp, BMP, jpg, JPG.'],obj.paths{iImFol});
            assert(nofExt==1,['More than one type of image files are found in:'...
                '\n\n%s\n\nPlease make sure all images are of same type.'],obj.paths{iImFol});
            
            obj.filenames{iImFol} = arrayfun(@(x) x.name, files, 'unif', 0);
            
            % if index has been supplied & frames are not stored in single stack
            if nargin>2 && ~obj.isSingleMultiPageTiff(iImFol)
                filenames = obj.filenames{iImFol}(iImage);
            else
                filenames = obj.filenames{iImFol};
            end