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: aamod_QA.m
    path of file: ./repos/automaticanalysis/aa_modules
    
    the code of the file until where you have to start completion: function [aap,resp] = aamod_QA(aap, task)
%
% generate a QA summary of functional data
%
% Change History
%
% fall 2023 [MSJ] -- new
%

resp='';

switch task
	
    case 'report'
        
    case 'doit'		  
        
        nvoxels = aas_getsetting(aap,'nvoxels');

    
function [aap,resp] = aamod_QA(aap, task)
%
% generate a QA summary of functional data
%
% Change History
%
% fall 2023 [MSJ] -- new
%

resp='';

switch task
	
    case 'report'
        
    case 'doit'		  
        
        nvoxels = aas_getsetting(aap,'nvoxels');
        carpetscale = aas_getsetting(aap,'carpetscale');

        outlier_filter = aas_getsetting(aap,'outlier_filter');
        outlier_threshold = aas_getsetting(aap,'outlier_threshold');
       
        imagedir = fullfile(aas_getstudypath(aap),'QA_images');
        if ~exist(imagedir,'dir');mkdir(imagedir);end