<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; ">Andre,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; ">Take a look at the&nbsp;LabelStatisticsImageFilter. It&nbsp;takes a label image as input via the function SetLabelInput() and generates a histogram for each labeled region if&nbsp;UseHistogramsOn() is set. &nbsp;The histogram for each labeled region is retrievable with&nbsp;GetHistogram(labelValue).</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; ">-Robert</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><br></div><div><div>On Dec 11, 2008, at 11:06 AM, <a href="mailto:a.bongers@mediri.com">a.bongers@mediri.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi,<br><br>a quick and probably easy(?) question, but I did not find anything about ist yet:<br><br>I would like to calculate a histogram over an irregular image region. So I masked an image with the required region (inside I left the values and outside I set everything to 0). <br>Is there any easy possibility to get the histogram from this region only ? Or do I really have to get the histogram from the whole image and "filter out" the zeros from first bin ?<br><br>Would be nice I anybody had a hint!<br><br>Thanks <br><br>Andre<br>_______________________________________________<br>Insight-users mailing list<br><a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br>http://www.itk.org/mailman/listinfo/insight-users<br></div></blockquote></div><br></body></html>