[ITK-users] How to add two RGB images?
Alberto Bert
bert.alberto at gmail.com
Thu Jan 28 07:13:12 EST 2016
Hi all,
I have got an grey level image and a binary segmentation mask extracted from it, and I would like to produce a third image, showing the segmented area in color on top the original grey level image.
Here is what I am doing:
image_rgb = sitk.ScalarToRGBColormap(image, colormap = sitk.ScalarToRGBColormapImageFilter.Grey)
mask_rgb = sitk.ScalarToRGBColormap(mask, colormap = sitk.ScalarToRGBColormapImageFilter.Red)
mask_overlay = image_rgb + mask_rgb
Unfortunately, mask_overlay looks just the same as image_rgb, as the addition were not doing any action.
Any help will be appreciated,
Thanks,
Alberto
PS
I am using SimpleITK 0.9.1 and Python 2.7
PPS
I have already tried the LabelOverlayImageFilter. In fact that was my first choice, but I cannot make it working either (see my previous email, please).
More information about the Insight-users
mailing list