[Insight-users] Distinguishing distinct thresholded features

Zachary Pincus zpincus at stanford.edu
Wed Dec 21 12:58:55 EST 2005


Hi folks -

Sorry, I didn't realize that the LabelStatistics filter computed  
bounding regions -- I scanned the documentation too briefly.

So, if you wanted to extract all of the different connected  
components from one binary image into individual images, here's an  
approach which would require minimal extra coding:

[binary image] -> ConnectedComponentImageFilter -> [label image] - 
 >RelabelComponentImageFilter -> [label image with consecutive  
labels] -> LabelStatisticsImageFilter -> [a bunch of different  
regions] -> ExtractImageFilter (repeatedly applied) -> [a bunch of  
different label images] -> ThresholdImageFilter -> [a bunch of  
separated binary images]

This process could be drastically simplified with some modifications  
to ConnectedComponentImageFilter, or by iterating through the output  
of that filter and building up the region bounding boxes yourself.  
This would be extremely easy. (Let me know if you want more guidance  
on that.)

Alternately, to create a PointSet, you would just iterate through the  
output of the ConnectedComponentImageFilter and add each labeled  
point to a corresponding PointSet. This would also be very easy.

Zach


On Dec 21, 2005, at 1:48 AM, Gaetan Lehmann wrote:

> On Wed, 21 Dec 2005 03:54:18 +0100, Zachary Pincus  
> <zpincus at stanford.edu> wrote:
>
>> There's a full list of all the classes available in ITK available  
>> here:
>> http://www.itk.org/Doxygen/html/classes.html
>>
>> You may be interested in the ConnectedComponentImageFilter:
>> http://www.itk.org/Doxygen/html/d3/d6a/ 
>> classitk_1_1ConnectedComponentImageFilter.html
>>
>> I tend to modify this filter to achieve whatever results I want  
>> (e.g. extracting each component into a separate image or  
>> whatever), but I think the same results could be achieved (albeit  
>> less efficiently, but these are fast operations we're talking  
>> about) with some combination of ConnectedComponentImageFilter,  
>> RelabelComponentImageFilter, ThresholdImageFilter,  
>> ExtractImageFilter, and some FloodFill iterator.
>>
>> I am actually surprised that there's no filter that takes a  
>> labeled image (e.g. the result of ConnectedComponentImageFilter)  
>> and reports the regions that contain each labeled region. Perhaps  
>> there is one but I don't know of it...
>
> LabelStatisticsImageFilter can give you the bounding box of each  
> label. That's what you want ?
> http://www.itk.org/Doxygen/html/d6/d8b/ 
> classitk_1_1LabelStatisticsImageFilter.html
>
>>
>> Zach
>>
>>
>>
>> On Dec 20, 2005, at 3:32 PM, Chris Farmer wrote:
>>
>>>
>>>
>>> Hi.  I’ve got a thresholded binary image which represents a  
>>> couple disconnected features of interest.  I’d like to extract  
>>> each of the distinct, disconnected features in my image and  
>>> represent it on its own (as either a smaller binary image or some  
>>> sort of mesh or pointset… doesn’t matter to me yet).  I’ve  
>>> thought about just trudging through the main image with a  
>>> neighborhood iterator and keeping track of “objects” I’ve seen,  
>>> but I was hoping someone here could suggest whether there are  
>>> established ways of accomplishing this.  I can’t seem to find any  
>>> search terms that lead me in the right direction in the archives.
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Chris
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Insight-users mailing list
>>> Insight-users at itk.org
>>> http://www.itk.org/mailman/listinfo/insight-users
>>
>> _______________________________________________
>> Insight-users mailing list
>> Insight-users at itk.org
>> http://www.itk.org/mailman/listinfo/insight-users
>
>
>
> -- 
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list