<div dir="ltr">Those old rank filters were designed to do big kernels quickly - they summarize the contents of the kernel in a histogram which needs to be updated as the kernel goes from one voxel to the next.<br>For a tiny kernel the histogram overhead is going to kill the performance, and a direct approach will be better.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 9, 2015 at 12:01 PM, Matt McCormick <span dir="ltr"><<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi jp,<br>
<br>
How does the MedianImageFilter compare?<br>
<br>
Thanks,<br>
Matt<br>
<br>
On Wed, Apr 8, 2015 at 10:46 AM, jp <<a href="mailto:cervellone@gmail.com">cervellone@gmail.com</a>> wrote:<br>
> Dear all,<br>
> i would like to apply a median filter but only in one image dimension, so i<br>
> use the rank image filter with a box structuring element. of radius 0,0,1.<br>
> While the result is what i want the speed is abysmal.<br>
> Does anyone have an idea ?<br>
><br>
> I am currenlly using itk 4.4.2 through python.<br>
><br>
> Here is the code:<br>
><br>
> strel = itk.FlatStructuringElement[3].Box([0,0,1])<br>
> median = itk.RankImageFilter[itkType,itkType, strel].New(reader,<br>
> Kernel=strel)<br>
><br>
> Thanks very much<br>
><br>
> jp<br>
><br>
><br>
><br>
><br>
> --<br>
> View this message in context: <a href="http://itk-users.7.n7.nabble.com/one-dimensional-median-filter-incredibly-slow-tp35473.html" target="_blank">http://itk-users.7.n7.nabble.com/one-dimensional-median-filter-incredibly-slow-tp35473.html</a><br>
> Sent from the ITK - Users mailing list archive at Nabble.com.<br>
> _____________________________________<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/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</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_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/insight-users" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
_____________________________________<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/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</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_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
</blockquote></div><br></div>