Stacking images forming one image

I have gabor filtered images and I am trying to stack them to get the original image back. I tried the concatente functions in tensorflow and numpy but they put the images next to each other vertically or horizontally and that is not what I need. I need to have something like the picture attached


In the picture, on the top left, this is the original image, on the right are the gabor filtered images and on the bottom left is the image after stacking the gabor filtered images. Any suggestions?