% Example of how the function is run 

% Identify the locations of the training data directory and the SPM12
% software
training_dir = '/localhome/john/atlas/LabelProp/HBP/training_data';
spm_dir      = '/localhome/john/Documents/spm12';

% Set up the MATLABPATH to include the necessary functions
path(spm_dir,path);
path(fullfile(spm('dir'),'toolbox','Shoot'),path)

PP = spm_select(Inf,'nifti','Select images');

for i=1:size(PP,1),
    label_subject(deblank(PP(i,:)),training_dir);
end

