[ITK] [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).
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list