[IGSTK-Users] (Micron)Tracker update problem

Andinet Enquobahrie andinet.enqu at kitware.com
Sun May 17 09:48:31 EDT 2009


Hi Vincent-

Thanks for the report. We will look into your analysis and make the
necessary changes.

Will keep you posted

Andinet

On Wed, May 13, 2009 at 11:32 AM, Vincent Gratsac
<vincent.gratsac at irisa.fr> wrote:
> Hi all,
>
> I am currently faced to a "locking" problem when using the igstk
> MicronTracker class.
>
> This class is multi-threaded :
>   - on one side, a separated thread (#1) communicates with the tracking
> system by continuously updating tools informations into a buffer
> (ThreadedUpdateStatus method). This is made in an infinite loop.
>   - on the other side, the principal thread (#0) reads informations from the
> buffer at a defined frequency, and affect it to TrackerTools objects.
>
> In order to make this process thread-safe, an Itk MutexLock object is used.
> My problem is that the separated thread (#1) locks and unlocks this mutex
> many times without letting the principal thread locking it, for a quite long
> time (around 100 milliseconds).
>
> This problem results in jerky effects on the user interface.
>
> I think that this problem should also happen for other Tracker classes,
> since this behaviour is implemented in the main Tracker class.
>
> To resolve this, I would suggest to insert a call to the sleep method in the
> infinite loop of the separated thread (at least 1 or 2 milliseconds), in
> order to let the principal thread lock the buffer and update TrackerTools
> informations.
>
> Did anyone also meet this problem before ?
> Do you think my suggestion could be integrated to the igstk cvs repository ?
>
> Thank you,
>
> Vincent
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users
>



More information about the IGSTK-Users mailing list