function [nDictionary] =GenerateDictionary(LSFSet,DicSize,ShiftStep)
%======================================================================
% Description
%
% This fuction generates a matrix of dictionary using an input set of dictionary atoms
%
% Variables
% LSFSet:   A set of dictionary atoms
% DicSize:  Number of shifted versions of the dictionary
% ShiftStep:The step of shift 
%
% This function is a part of Image Forensic Analyzer Program
% Written by: Thirapiroon Thongkamwitoon
% Communications and Signal Processing Research Group
% Department of Electrical and Electronic Engineering
% Imperial College London, South Kensington Campus, London SW7 2AZ
%
% Email : tt1410@imperial.ac.uk, thirapiroon@yahoo.com 
%======================================================================


%----- Read the number of dictionary atoms -------

NumberOfAtoms=size(LSFSet,1)

%================================================

%-- Set the default width of the kernel windows 
KWidth=51;


for i=1:NumberOfAtoms    
 cKernel(i,:)=ChopByMax(LSFSet(i,:),KWidth);
end

%%%%%%%%%%%%%%%%%%%%%%%%

%------------------------
%  DICTIONARY BUILDING 
%------------------------

for i=1:NumberOfAtoms
nDictionary(i,:,:) = FitLSF2Dictionary(cKernel(i,:),DicSize,ShiftStep);
end


end