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: align_itab2spm.m
    path of file: ./repos/malini/Codes/deconvolution - model/spm8/external/fieldtrip/utilities/private
    
    the code of the file until where you have to start completion: function [mri] = align_itab2spm(mri, opt)

% ALIGN_ITAB2SPM performs an approximate alignment of the anatomical volume
% from ITAB towards SPM coordinates. Only the homogenous transformation matrix
% is modified and the coordsys-field is updated.
%
% Use as
%   mri = align_itab2spm(mri)
%   mri = align_itab2spm(mri, opt)
%

    
function [mri] = align_itab2spm(mri, opt)

% ALIGN_ITAB2SPM performs an approximate alignment of the anatomical volume
% from ITAB towards SPM coordinates. Only the homogenous transformation matrix
% is modified and the coordsys-field is updated.
%
% Use as
%   mri = align_itab2spm(mri)
%   mri = align_itab2spm(mri, opt)
%
% Where mri is a FieldTrip MRI-structure, and opt an optional argument
% specifying how the registration is done.
%   opt = 0: only an approximate coregistration
%   opt = 1: an approximate coregistration, followed by spm_affreg
%   opt = 2: (default): an approximate coregistration, followed by spm_normalise

if nargin<2
  opt = 2;
end