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: cat_vol_optimizeTemplate.m
    path of file: ./repos/cat12/internal
    
    the code of the file until where you have to start completion: function cat_vol_optimizeTemplate(job)
% _______________________________________________________________________
% Set resolution and data type of a Dartel or Shooting template to save
% disk space. This is a private function that is not intensivly tested.
%
%   cat_vol_optimizeTemplate(job)
%
%   job.vox    = resolution of the new template images (default = 1.5)

    
function cat_vol_optimizeTemplate(job)
% _______________________________________________________________________
% Set resolution and data type of a Dartel or Shooting template to save
% disk space. This is a private function that is not intensivly tested.
%
%   cat_vol_optimizeTemplate(job)
%
%   job.vox    = resolution of the new template images (default = 1.5)
%   job.repair = repair artifacts in the template with a median filter that
%                modify only a few incorrect voxels 
%                (quick and dirty solution that rewrite the original data!)
%
% _______________________________________________________________________
% $Id$


  %% prepare data structur
  if ~exist('job','var'), job = struct(); end