I have an image stack with two channels containing the image and corresponding mask of the contained objects (which I extract using thresholding). Each slice is a time step. I generate the masks in Python an store them with the original image to TIFF in the two separate channels.
I would now like to semi-transparently overlay the object mask in the second channel over the image in the first channel from within the ImageJ GUI. That way I could easily browse through the time steps to check, if the masks are correct. See the Python code below to have a better idea of the results I am going for.
I did already try using the “glesbay inverted” LUT to color the mask-channel (which AFAIK should assign different colors independently of intensity), but for some reason only some of the objects are transparent (see the image below).
import matplotlib.pyplot as plt from skimage.color import label2rgb from skimage.measure import label plt.imshow(objects_image, cmap='gray') plt.imshow(label2rgb(label(objects_mask, connectivity=1), bg_label=0), alpha=0.05) plt.show()