[Insight-users] ITK-VTK pipeline progress bar help

Luis Ibanez luis.ibanez at kitware.com
Thu Apr 22 10:52:51 EDT 2010


Hi Somi,

You may want to look at the example:

InsightApplications/QtITK/
CMakeLists.txt
itkQtAdaptor.h
itkQtLightIndicator.h
itkQtProgressBar.cxx
itkQtProgressBar.h
qtITK.cxx

http://www.itk.org/cgi-bin/viewcvs.cgi/QtITK/?root=InsightApplications

It show how to update a Qt progress bar by
capturing progress events sent from an ITK
filter.

More specifically about your questions:


a) In order to integrate a single progress value
    by composing the progress reported by each
    individual filter in a pipeline, you can use the
    helper class:

         Insight/Code/Common/
              itkProgressAccumulator.h
              itkProgressAccumulator.cxx

    you need to register all the ITK filters with it
    and you must come up with a percentage of
    how much each filter contributes to the total
    progress of the pipeline.

    For examples of use, look at any of the following
    filters:

              Insight/Code/BasicFilters/
itkOpeningByReconstructionImageFilter.txx
itkOrientImageFilter.txx
itkSignedDanielssonDistanceMapImageFilter.txx
itkSignedMaurerDistanceMapImageFilter.txx
itkSmoothingRecursiveGaussianImageFilter.txx
itkZeroCrossingBasedEdgeDetectionImageFilter.txx


b) Since ITK and VTK are independent toolkits you
    will have to write specific command observers for
    each family of filters.

    and you may have to write a customized Progress
    Accumulator that can take contributions from both
    ITK and VTK.  Strictly speaking the progress
    accumulator doesn't even need to know that filters
    are involved in the process. It just needs to know
    about relative contributions of every stage of
    processing.


c)  Why would you use iterators in the pipeline ?

     Iterators are usually hidden from the
     view of mortals inside the protective
     enclosure of filters    :-)


   Regards,


       Luis


-------------------------------------------------------------------
On Tue, Apr 20, 2010 at 3:39 PM, somi <seesomi at gmail.com> wrote:

> Hi,
> I have a Qt based application where I load some image using ITK, do
> segmentation, extract subsurface and display using vtk.
> I need some help displaying the progress events.
>
> 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.
>
> a) How can I get the progress of the whole pipeline ? Do I have to use
> QProgressDialog progress +  progress.setValue(n) + qApp->processEvents();
> manually setting value of n after every filter ?
>
> 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
>
> c) What changes do I have to do if I use iterators in my pipeline ?
>
>
> Thanks,
> Somi
>
>
>
>
> _____________________________________
> 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.html
>
> 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/20100422/e47d17d4/attachment-0001.htm>


More information about the Insight-users mailing list