[ITK] [ITK-users] LabelOverlayImageFilter with a binary mask: everything red

Alberto Bert bert.alberto at gmail.com
Thu Jan 28 05:30:09 EST 2016


Hi all,

I am trying to produce a coloured overlay between a UInt16 grey-level image and a segmentation mask extracted from such image. The segmentation mask is a UInt8 image valued 1 in the segmented area and 0 elsewhere.

If I try to:

 mask_overlay = sitk.LabelOverlay(image, mask, opacity = 0, backgroundValue = 0)   # I am using SimpleITK 0.9.1 with Python 2.7

and then I write the mask_overlay (as .nii), I get an image almost completely reddish, while I expected to get the original grey-level image, with some red (or other color) corresponding only to the pixels valued 1 in the mask. (I did check the mask itself, and very few pixels are valued 1)

What am I doing (or expecting) wrong?

Thank you in advance,
Best
Alberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160128/3a6fbcec/attachment.html>
-------------- next part --------------
_____________________________________
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