<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:11.0pt;
font-family:Arial'>Dear all,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:11.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:11.0pt;
font-family:Arial'>I am using the OpenIGTLinkTrackerBroadcastingUI.exe example
program to connect my Aurora tracking system to in-house developed tracking
software which uses the OpenIGTLink.dll.<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>In order to improve the
communication between the programs I added a ToolTrackingStoppedEvent to the
updateObserver.<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>When I hit the StopTracking button
the updateObserver ToolTrackingStoppedEvent is nicely called.<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>When I call StopTrackingMsg = igtl::StopTrackingDataMessage::New();
I get an access violation because the m_DefaultBodyType of the
StopTrackingDataMessage can not be set.<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>Within
OpenIGTLinkTrackingBroadcaster.h:<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>if( m_Sockets.empty() )<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>{ return;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>}<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>//do something only for the correct
tool<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>if( this->m_Tool.GetPointer() ==
caller )<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>{              
//the tool transform has been updated, get it<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>  if( dynamic_cast<const
igstk::TrackerToolTransformUpdateEvent  *>( &event) )<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>  { //send the transform<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>  }<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>  else if( dynamic_cast<const
igstk::ToolTrackingStoppedEvent  *>( &event) )<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>  {
igtl::StopTrackingDataMessage::Pointer StopTrackingMsg;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>    StopTrackingMsg =
igtl::StopTrackingDataMessage::New(); <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>    std::vector<
igtl::ClientSocket::Pointer >::iterator it; <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>    for (it = this->m_Sockets.begin();
it != this->m_Sockets.end(); ++it)<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>    { StopTrackingMsg->Pack();<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>      (*it)->Send(StopTrackingMsg->GetPackPointer(),
StopTrackingMsg->GetPackSize());<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>    }<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>  } <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>} <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>            <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:11.0pt;
font-family:Arial'>Any help to fix this problem is greatly appreciated. <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'>Jasper<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Consolas><span
style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></font></p>

</div>

</body>

</html>