Hi Luis,<br>Thanks for your reply. It was very helpful.<br>My application has the following flow:<br><br>a)User specifies ROI interactively <br>b) Do segmentation in the specified region to get region A and B<br>c) Based on user specified thickness, label the boundary of the A and B  as a new label C (of thickness specified by user)<br>
d) Visualize the segmentation<br><br>Currently I have set this up as a series of ITK and VTK filters. Note that due to size of dataset I release data on all filters, so the whole pipeline is re-executed every time.<br><br>
Currently I use neighborhood iterators for (c) . Should I wrap the functionality into a filter ?<br>As the whole pipeline is re-executed everytime, what would be the disadvantage of using iterators instead of a filter ?<br>
<br>Thanks,<br>Somi<br><br><br><div class="gmail_quote">On Thu, Apr 22, 2010 at 10:52 AM, Luis Ibanez <span dir="ltr">&lt;<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5"><br>Hi Somi,<br><br>You may want to look at the example:<br><br>InsightApplications/QtITK/<br>CMakeLists.txt<br>itkQtAdaptor.h<br>itkQtLightIndicator.h<br>itkQtProgressBar.cxx<br>itkQtProgressBar.h<br>
qtITK.cxx<br><br><a href="http://www.itk.org/cgi-bin/viewcvs.cgi/QtITK/?root=InsightApplications" target="_blank">http://www.itk.org/cgi-bin/viewcvs.cgi/QtITK/?root=InsightApplications</a><br>
<br>It show how to update a Qt progress bar by <br>capturing progress events sent from an ITK<br>filter.<br><br>More specifically about your questions:<br><br><br>a) In order to integrate a single progress value <br>    by composing the progress reported by each <br>

    individual filter in a pipeline, you can use the<br>    helper class:<br><br>         Insight/Code/Common/<br>              itkProgressAccumulator.h<br>              itkProgressAccumulator.cxx<br><br>    you need to register all the ITK filters with it<br>

    and you must come up with a percentage of<br>    how much each filter contributes to the total<br>    progress of the pipeline.<br><br>    For examples of use, look at any of the following<br>    filters:<br><br>              Insight/Code/BasicFilters/<br>

itkOpeningByReconstructionImageFilter.txx<br>itkOrientImageFilter.txx<br>itkSignedDanielssonDistanceMapImageFilter.txx<br>itkSignedMaurerDistanceMapImageFilter.txx<br>itkSmoothingRecursiveGaussianImageFilter.txx<br>itkZeroCrossingBasedEdgeDetectionImageFilter.txx     <br>

<br><br>b) Since ITK and VTK are independent toolkits you  <br>    will have to write specific command observers for<br>    each family of filters.<br><br>    and you may have to write a customized Progress<br>    Accumulator that can take contributions from both<br>

    ITK and VTK.  Strictly speaking the progress <br>    accumulator doesn&#39;t even need to know that filters<br>    are involved in the process. It just needs to know<br>    about relative contributions of every stage of <br>

    processing.<br><br><br>c)  Why would you use iterators in the pipeline ?<br>     <br>     Iterators are usually hidden from the <br>     view of mortals inside the protective <br>     enclosure of filters    :-)<br><br>

<br>   Regards,<br><br><br>       Luis<br>   <br><br>-------------------------------------------------------------------<br></div></div><div class="gmail_quote"><div><div></div><div class="h5">On Tue, Apr 20, 2010 at 3:39 PM, somi <span dir="ltr">&lt;<a href="mailto:seesomi@gmail.com" target="_blank">seesomi@gmail.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">Hi,<br>I have a Qt based application where I load some image using ITK, do segmentation, extract subsurface and display using vtk.<br>

I need some help displaying the progress events.<br><br>I have connected the ITK and VTK pipelines .  I want to show progress of individual as well as total progress in separate Qt progress bars.<br>
<br>a) How can I get the progress of the whole pipeline ? Do I have to use QProgressDialog progress +  progress.setValue(n) +
qApp-&gt;processEvents(); manually setting value of n after every
filter ?<br>
<br>b) For individual filter progress update do I use two different classes one overriding  itk::Command and other  vtk::Command ? Do I have to use separate progress bar for ITK/VTK<br><br>c) What changes do I have to do if I use iterators in my pipeline ?<br>


<br><br>Thanks,<br><font color="#888888">Somi<br><br><br><br>
</font><br></div></div><div class="im">_____________________________________<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.html" target="_blank">http://www.kitware.com/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_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/listinfo/insight-users</a><br>
<br></div></blockquote></div><br>
</blockquote></div><br>