def create_montages(self, images, montage_image_number, image_size, full_montage_image_size):
    output = []
    if (montage_image_number == 4):
        data = images.reshape(int((len(images) / montage_image_number)), montage_image_number, image_size, image_size, 3)
        for iter in range(len(data)):
            img_set = data[iter]
            outputImage = np.zeros((full_montage_image_size, full_montage_image_size, 3))
            outputImage[0:image_size, 0:image_size, :] = img_set[0]
            outputImage[0:image_size, image_size:(2 * image_size), :] = img_set[1]
            outputImage[image_size:(2 * image_size), 0:image_size, :] = img_set[2]
            outputImage[image_size:(2 * image_size), image_size:(2 * image_size), :] = img_set[3]
            output.append(outputImage)
    else:
        raise Exception('Only implemented to montage 4 images into one image')
    return np.array(output)
def create_montages(self, images, montage_image_number, image_size, full_montage_image_size):
    output = []
    if (montage_image_number == 4):
        data = images.reshape(int((len(images) / montage_image_number)), montage_image_number, image_size, image_size, 3)
        for iter in range(len(data)):
            img_set = data[iter]
            outputImage = np.zeros((full_montage_image_size, full_montage_image_size, 3))
            outputImage[0:image_size, 0:image_size, :] = img_set[0]
            outputImage[0:image_size, image_size:(2 * image_size), :] = img_set[1]
            outputImage[image_size:(2 * image_size), 0:image_size, :] = img_set[2]
            outputImage[image_size:(2 * image_size), image_size:(2 * image_size), :] = img_set[3]
            output.append(outputImage)
    else:
        raise Exception('Only implemented to montage 4 images into one image')
    return np.array(output)