[Insight-users] MRI Image Head Area Mask

Bradley Lowekamp blowekamp at mail.nih.gov
Mon Nov 12 09:57:46 EST 2012


Hello,

So to summarize you would like to do the following:

1) Estimate a threshold from a histogram and perform thresholding.
2) Run a "hole filling" algorithm.

ITK has approximately 13 automatic thresholding algorithms which compute the histogram and estimate the correct threshold.

http://www.itk.org/Doxygen/html/group__ITKThresholding.html

SimpleITK should have all of these methods available, I'd said it's highly likely there is an existing methods which may meet your needs.

The I believe you are looking for the "BinaryFillhole" filter for the  second step, this should also be available in SimpleITK.


Now, if you don't find any of the existing automatic thresholding algorithms suitable, you have a lot of options on how to implement it. 

If you are working in C# with SimpleITK perhaps it is easiest to just create histogram yourself from the image array ( I am not sure how the image array access is done is C# Dan Mueller may be able to help here) or less efficiently from the GetPixel methods. From there you can compute the threshold and use the BinaryThreshold filter.

Alternatively, you can go the C++ route and follow how the other automatic threshold filter have done things and create the Calculator and filter class for your method. 

Good Luck,
Brad


On Nov 12, 2012, at 2:43 AM, Sebastian Widz <widz at infovision.pl> wrote:

> Dear ITK Team and ITK Users,
>  
> I am looking for an ITK solution to the following task:
>  
> For a given T1 weighted MRI Brain Image (Axial plane) create a binary mask that would mark the head region (extract head object from the background)
> In the past I’ve been doing it by analyzing image histogram, finding the first peak, then finding the first local minimum (m) value with magnitude values greater than the histogram peak.
> Pixels with values with magnitude lower or equal (m) were marked with zeros (0), pixels with higher values where marked as ones (1).
> Then some “hole filling” algorithm needs to be applied in order to create a convex shape.
>  
> Can the same be done with ITK filters (possibly SimpleITK as I use the C# Managed version)?
> Maybe there are some other ways you would suggest, as my way not always gives expected .
>  
> Best Regards,
> Sebastian
> _____________________________________
> 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://www.itk.org/mailman/listinfo/insight-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121112/5a09419d/attachment.htm>


More information about the Insight-users mailing list