function smoothField = projectionSmooth(field,mask,sigma)
    if nargin < 2
        mask = sum(abs(field),4) > 0.1;
    end
    if nargin < 3
        sigma = 1;
    end
    smoothField = zeros(size(field));
    st = single(zeros(size(field,1),size(field,2),size(field,3),6));
    ch = 1;
    for u = 1:size(field,4)
        for v = u:size(field,4)
            st(:,:,:,ch) = single(maskedGaussianFilter(squeeze(field(:,:,:,u).*field(:,:,:,v)),mask,sigma));
            ch = ch+1;
        end
    end
    [~,~,~,U,V,W,~,~,~,~,~,~] = EigenVectors3D(squeeze(st(:,:,:,1)),squeeze(st(:,:,:,2)),squeeze(st(:,:,:,3)),...
                                                squeeze(st(:,:,:,4)),squeeze(st(:,:,:,5)),squeeze(st(:,:,:,6)));
    smoothField(:,:,:,1) = U;
    smoothField(:,:,:,2) = V;
    smoothField(:,:,:,3) = W;
end
