<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Please make sure you are compiling your code in Release mode. It can make over a 10X performance difference.</div><div><br></div><div>The median image filter is not fast for large regions. You may want to look into the FastApproximageRankImageFilter [1, 2], or just the RankImageFilter.</div><div><br></div>You can look at how The ConnectedThresholdImageFitler reports progress in the code [3]. It does as good of a job as possible reporting progress. It will go smoothly for the number of pixels in the region, then just at the end for the number of pixels not visited.<div><br></div><div>You may want to look into teh GrayscaleDilateImageFilter to do you binary morphology [4].<br><div><br></div><div>HTH,</div><div>Brad</div><div><br></div><div>[1] <a href="http://www.itk.org/Doxygen/html/classitk_1_1FastApproximateRankImageFilter.html">http://www.itk.org/Doxygen/html/classitk_1_1FastApproximateRankImageFilter.html</a></div><div>[2] <a href="http://www.insight-journal.org/browse/publication/160">http://www.insight-journal.org/browse/publication/160</a></div><div>[3] <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.hxx#L268-L328">https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.hxx#L268-L328</a></div><div>[4] <a href="http://www.itk.org/Doxygen/html/classitk_1_1GrayscaleDilateImageFilter.html">http://www.itk.org/Doxygen/html/classitk_1_1GrayscaleDilateImageFilter.html</a><br><div><div>On Jun 8, 2015, at 2:34 PM, zagwin <<a href="mailto:zagwin@gmail.com">zagwin@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hello,<br><br>I made a minipipeline using MedianImageFilter,<br>ConnectedThresholdImageFilter, and BinaryDilateImageFilter. My progress bar<br>will increase from 0->0.5 slowly, and then stop 0.5 for a while, and jump to<br>0.75, and increase slowly to 1. So, I suppose the<br>ConnectedThresholdImageFilter does not support progress. Am I right? or I<br>made a mistake?<br><br>In the ::GenerateData()<br>{<br><br>typename ProgressAccumulator::Pointer progress = ProgressAccumulator::New();<br>progress->SetMiniPipelineFilter(this);<br><span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>//Get InputImage<br>const typename TInput::ConstPointer inputImage( this->GetInput() );<br><br>typedef itk::MedianImageFilter<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>   <InputImageType, InputImageType> <br>MedianImageFilterType;<br>typedef itk::ConnectedThresholdImageFilter <InputImageType, OutputImageType> <br>ConnectedThresholdFilterType;<br>typedef itk::BinaryBallStructuringElement  <OutputImagePixelType,<br>ImageDimension>  StructuringElementType;<br>typedef itk::BinaryDilateImageFilter       <OutputImageType,<br>OutputImageType, StructuringElementType> BinaryDilateFilterType;<br><br>MedianImageFilterType::Pointer         medianfilter  =<br>MedianImageFilterType::New();<br>ConnectedThresholdFilterType::Pointer  ccthreshold   =<br>ConnectedThresholdFilterType::New();<br>BinaryDilateFilterType::Pointer        bDilate       =<br>BinaryDilateFilterType::New();<br><br>progress->RegisterInternalFilter(medianfilter,.5f);<br>progress->RegisterInternalFilter(ccthreshold, .25f);<br>progress->RegisterInternalFilter(bDilate,     .25f);<br><br>.......<br>}<br><br><br><br>--<br>View this message in context: <a href="http://itk-users.7.n7.nabble.com/itkConnectedThresholdImageFilter-does-not-support-Progress-tp35782.html">http://itk-users.7.n7.nabble.com/itkConnectedThresholdImageFilter-does-not-support-Progress-tp35782.html</a><br>Sent from the ITK - Users mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_____________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://public.kitware.com/mailman/listinfo/insight-users<br></blockquote></div><br></div></div></body></html>