[ITK] [ITK-users] Help

Matt McCormick matt.mccormick at kitware.com
Thu May 7 11:21:48 EDT 2015


Hi Denis,

An itk::Command class can be created to observe the IterationEvent [1].
Many of the registration examples have code that uses a Command to print
out status at each iteration.

Hope this helps,
Matt

[1]
http://itk.org/ITKExamples/src/Core/Common/ObserveAnEvent/Documentation.html

On Thu, May 7, 2015 at 10:59 AM, Abu-Sammour, Denis <
Denis.Abu-Sammour at medma.uni-heidelberg.de> wrote:

> Thanks for the reply.
>
>
>
> My exact problem is where to put the TimeProbe functions. So I tried to
> place the “clock.Start()” and “clock.Stop()” methods around
> “registration->Update()” as follows
>
>
>
> itk::TimeProbe clock;
>
>   try
>
>     {
>
>                   clock.Start();
>
>     registration->Update();
>
>                 clock.Stop();
>
>>
>
>
> And in this case I got a total computation time for the registration
> process of about 6.8 seconds. Now given that there are 22 iterations until
> convergence for that particular case the average time per iteration would
> be 6.8/22= 0.31 seconds per iteration. Now I tried placing the
> “clock.Start()” and “clock.Stop()” inside the body of the “Execute()”
> function as suggested by  Guillaume and got numbers ranging between 0.004
> to 0.007 per iteration so its much lower than the anticipated 0.31 sec per
> iteration. Please advise.
>
>
>
> Thanks.
>
>
>
> Denis
>
>
>
>
>
> *Von:* Matt McCormick [mailto:matt.mccormick at kitware.com]
> *Gesendet:* Donnerstag, 7. Mai 2015 16:14
> *An:* Guillaume Lemaître
> *Cc:* Abu-Sammour, Denis; insight-users at itk.org
> *Betreff:* Re: [ITK-users] Help
>
>
>
> Hi,
>
>
>
> The TimeProbe [1] and RealTimeClock [2] classes could be useful here.
>
>
>
> Matt
>
>
>
> [1]
> http://itk.org/ITKExamples/src/Core/Common/ComputeTimeBetweenPoints/Documentation.html
>
>
>
> [2] http://www.itk.org/Doxygen/html/classitk_1_1RealTimeClock.html
>
>
>
> On Thu, May 7, 2015 at 8:36 AM, Guillaume Lemaître <g.lemaitre58 at gmail.com>
> wrote:
>
> Hi,
>
> I am not 100% sure since that I didn't put the hand in the code but the
> function Execute() seems to be call at each iteration since that they show
> the parameter values. Maybe put a timer there.
>
> Cheers,
>
>
>
> On 7 May 2015 at 13:38, Abu-Sammour, Denis <
> Denis.Abu-Sammour at medma.uni-heidelberg.de> wrote:
>
> Hello,
>
>
>
> Based on Example: ImageRegistration6.cxx (or any other registration
> example) how can I get the elapsed time for the evaluation of each
> iteration step of the registration process?
>
>
>
> Thanks
>
>
>
> Denis
>
>
>
>
>
> _____________________________________
> 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.php
>
> 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://public.kitware.com/mailman/listinfo/insight-users
>
>
>
>
> --
>
> *LEMAÎTRE Guillaume*
>
>
> *PhD CandiateMSc Erasmus Mundus ViBOT (Vision-roBOTic)*
> *MSc Business Innovation and Technology Management*
> g.lemaitre58 at gmail.com
>
> *ViCOROB - Computer Vision and Robotic Team*
> Universitat de Girona, Campus Montilivi, Edifici P-IV 17071 Girona
> Tel. +34 972 41 98 12 - Fax. +34 972 41 82 59
> http://vicorob.udg.es/
> *LE2I - Le Creusot*
> IUT Le Creusot, Laboratoire LE2I, 12 rue de la Fonderie, 71200 Le Creusot
> Tel. +33 3 85 73 10 90 - Fax. +33 3 85 73 10 97
> http://le2i.cnrs.fr
>
>
>
> https://sites.google.com/site/glemaitre58/
> Vice - Chairman of A.S.C. Fours UFOLEP
> Chairman of A.S.C. Fours FFC
> Webmaster of http://ascfours.free.fr
>
>
> _____________________________________
> 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.php
>
> 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://public.kitware.com/mailman/listinfo/insight-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150507/12a9f495/attachment.html>
-------------- next part --------------
_____________________________________
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.php

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://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list