<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello,<div class=""><br class=""></div><div class="">There two potential issues here you need to isolate. The first: Is the filter behaving the way you expect? And the second: Is the image being written correctly? also related is: Does the view support the file type you created?</div><div class=""><br class=""></div><div class="">Start by inspecting the pixel values of output image.</div><div class=""><br class=""></div><div class="">Also keep in mind that many gray scale viewers apply window and leveling, while RGB viewers don’t. So you may need to scale the intensity of you gray scale image before apply the LabelOverlay filter.</div><div class=""><br class=""></div><div class="">HTH,</div><div class="">Brad</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 28, 2016, at 6:51 AM, Alberto Bert <<a href="mailto:bert.alberto@gmail.com" class="">bert.alberto@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">a few updates...<br class=""><div class=""><br class=""></div><div class="">Instead of using .nii, I tried to save the output overlay image in:</div><div class=""> .png - the resulting image is in grey levels, but I cannot see any red (or other colors)</div><div class="">.dcm - the resulting image looks corrupted both opened with imagej and Osirix</div><div class=""><br class=""></div><div class="">Any ideas?</div><div class=""><br class=""></div><div class="">Thanks</div><div class="">Alberto</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 28 Jan 2016, at 11:30, Alberto Bert <<a href="mailto:bert.alberto@gmail.com" class="">bert.alberto@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi all,<div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">If I try to:</div><div class=""><br class=""></div><div class=""> mask_overlay = sitk.LabelOverlay(image, mask, opacity = 0, backgroundValue = 0) # I am using SimpleITK 0.9.1 with Python 2.7</div><div class=""><br class=""></div><div class="">and then I write the mask_overlay (as .nii), I get an image almost completely <i class="">reddish</i>, 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)</div><div class=""><br class=""></div><div class="">What am I doing (or expecting) wrong?</div><div class=""><br class=""></div><div class="">Thank you in advance,</div><div class="">Best</div><div class="">Alberto</div></div></div></blockquote></div><br class=""></div></div></div>_____________________________________<br class="">Powered by <a href="http://www.kitware.com" class="">www.kitware.com</a><br class=""><br class="">Visit other Kitware open-source projects at<br class=""><a href="http://www.kitware.com/opensource/opensource.html" class="">http://www.kitware.com/opensource/opensource.html</a><br class=""><br class="">Kitware offers ITK Training Courses, for more information visit:<br class="">http://www.kitware.com/products/protraining.php<br class=""><br class="">Please keep messages on-topic and check the ITK FAQ at:<br class="">http://www.itk.org/Wiki/ITK_FAQ<br class=""><br class="">Follow this link to subscribe/unsubscribe:<br class="">http://public.kitware.com/mailman/listinfo/insight-users<br class=""></div></blockquote></div><br class=""></div></body></html>