You could divide the image into subregions via the &quot;splitter&quot; functions in ITK. Then iterate each subregion, place the values in a std vector, sort, and find the median. <br><br><div class="gmail_quote">2011/6/24 Françoise Lefebvre <span dir="ltr">&lt;<a href="mailto:lefebvre@imnc.in2p3.fr">lefebvre@imnc.in2p3.fr</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Hi,<br>
<br>
Is there a simple method to compute the median of the values over a given rectangular region from an image. The MedianImageFunction only computes it over the standard 8, 26, etc. connected neighborhood of a pixel.<br>
<br>
Thank you in advance<br>
<br>
Regards,<br>
<br>
Françoise L.<br>
<br>
______________________________<u></u>_______<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/<u></u>products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_<u></u>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/<u></u>listinfo/insight-users</a><br>
</blockquote></div><br>