[Rtk-users] Reconstruction filter progress observer

Cyril Mory cyril.mory at creatis.insa-lyon.fr
Thu Nov 9 14:34:26 CET 2017


A few more sentences on this point:

- Indeed, very few RTK filters currently perform progress reporting

- For pipelines (instead of individual filters), you want to use that 
class: https://itk.org/Doxygen/html/classitk_1_1ProgressAccumulator.html.

- Despite its name, "progress.CompletedPixel()" can be called after any 
meaningful step, not just the update of a pixel. On iterative filters, 
for example, 
http://www.cs.cmu.edu/~galeotti/methods_course/ITK_Filters2.pdf suggest 
thatProgressReporter can be initialized with the maximum number of 
iterations instead of with the total number of pixels to update, and 
progress.CompletedPixel() can be called at each iteration. So if you are 
reconstructing with an iterative reconstruction filter, you could start 
by trying to add a ProgressReporter to that class, and count its 
iterations. That's for the modifications to perform in the RTK code, it 
is probably just a few lines for the first test.

Now, your question was about the existence of some code to observe the 
progress of a filter, assuming that filter does call the
progress.CompletedPixel() adequately. You may want to check this ITK 
example:
https://itk.org/Doxygen/html/SphinxExamples_2src_2Core_2Common_2ObserveAnEvent_2Code_8cxx-example.html

I hope it helps,
Cyril


On 09/11/2017 14:29, Simon Rit wrote:
> Dear Albert,
> We have not implemented anything in this direction so far. But it 
> would be useful to have it and I know there is a mechanism to do that 
> in ITK Have you ever used it on your side?
> I think the idea is:
> - in the reconstruction filter, to create and regularly call a 
> ProgressReporter 
> <https://itk.org/Doxygen/html/classitk_1_1ProgressReporter.html>,
> - where you want to observe the progress, you add an observer.
> There are many examples in ITK. If you want to do it, feel free to 
> give it a try. If you need help, I'm happy to support your. I have 
> created an issue <https://github.com/SimonRit/RTK/issues/114> in 
> github to keep it in mind.
> Simon
>
> On Thu, Nov 9, 2017 at 1:27 PM, MURIENNE Albert 
> <albert.murienne at thalesgroup.com 
> <mailto:albert.murienne at thalesgroup.com>> wrote:
>
>     Cyril, to be more precise : if I run a long time reconstruction, I
>     want to be available to track progression of the computation (ie 0
>     to 1 floating index), to have an idea of how fast it is running,
>     if we are close to the end and so on…
>
>     Albert
>
>     *De :*Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr
>     <mailto:cyril.mory at creatis.insa-lyon.fr>]
>     *Envoyé :* jeudi 9 novembre 2017 13:25
>     *À :* MURIENNE Albert; rtk-users at public.kitware.com
>     <mailto:rtk-users at public.kitware.com>
>     *Objet :* Re: [Rtk-users] Reconstruction filter progress observer
>
>     Hello,
>
>     I am not sure I understand. Are you trying to know, during
>     runtime, which filter is currently being updated ?
>
>     Otherwise, can you reformulate your question (possibly with more
>     context) ?
>
>     Best,
>     Cyril
>
>     On 09/11/2017 13:11, MURIENNE Albert wrote:
>
>         Hello,
>
>         Is there a simple code example available to illustrate the
>         registration of an observer to be notified with the
>         progression of rtk’s reconstruction filters?
>
>         Thanks in advance for your help,
>
>         Regards
>
>         --
>
>         Albert Murienne
>
>
>
>
>         _______________________________________________
>
>         Rtk-users mailing list
>
>         Rtk-users at public.kitware.com <mailto:Rtk-users at public.kitware.com>
>
>         http://public.kitware.com/mailman/listinfo/rtk-users
>         <http://public.kitware.com/mailman/listinfo/rtk-users>
>
>
>     _______________________________________________
>     Rtk-users mailing list
>     Rtk-users at public.kitware.com <mailto:Rtk-users at public.kitware.com>
>     http://public.kitware.com/mailman/listinfo/rtk-users
>     <http://public.kitware.com/mailman/listinfo/rtk-users>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.creatis.insa-lyon.fr/pipermail/rtk-users/attachments/20171109/bcdf8f65/attachment.htm>


More information about the Rtk-users mailing list