[Insight-users] histogram from masked image region only

Robert Tamburo robert.tamburo at gmail.com
Thu Dec 11 11:38:16 EST 2008


Andre,

Take a look at the LabelStatisticsImageFilter. It takes a label image  
as input via the function SetLabelInput() and generates a histogram  
for each labeled region if UseHistogramsOn() is set.  The histogram  
for each labeled region is retrievable with GetHistogram(labelValue).

-Robert

On Dec 11, 2008, at 11:06 AM, a.bongers at mediri.com wrote:

> Hi,
>
> a quick and probably easy(?) question, but I did not find anything  
> about ist yet:
>
> 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).
> 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 ?
>
> Would be nice I anybody had a hint!
>
> Thanks
>
> Andre
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081211/6fe67d3a/attachment.htm>


More information about the Insight-users mailing list