function [ rgb ] = array2rgb(array)
% array2double3d -- converts a mono integer array into an rgb double array
% may be required in some cases for compatibility
% Louis Woodhams 2019

if numel(size(array)) == 3
    rgb(:,:,1,:) = array;
    rgb(:,:,2,:) = array;
    rgb(:,:,3,:) = array;
elseif numel(size(array)) == 4
    rgb = array;
else
    error('3 or 4 dimensional arrays only.')
end