Skip to content

Commit

Permalink
Import the message time stamp to the MRML node. (openigtlink#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
tokjun committed Nov 17, 2023
1 parent 3c3d502 commit 6152641
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions OpenIGTLinkIF/MRML/vtkMRMLIGTLConnectorNode.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -601,10 +601,13 @@ void vtkMRMLIGTLConnectorNode::ProcessIncomingDeviceModifiedEvent(

// copy metadata from igtl message to MRML node
for (igtl::MessageBase::MetaDataMap::const_iterator iter = modifiedDevice->GetMetaData().begin(); iter != modifiedDevice->GetMetaData().end(); ++iter)
{
{
std::string tag = "OpenIGTLink." + iter->first;
modifiedNode->SetAttribute(tag.c_str(), iter->second.second.c_str());
}
}

// Copy time stamp from igtl message to MRML node
modifiedNode->SetAttribute("OpenIGTLink.TimeStamp", std::to_string(modifiedDevice->GetTimestamp()).c_str());
}

vtkMRMLIGTLQueryNode* queryNode = this->Internal->GetPendingQueryNodeForDevice(modifiedDevice);
Expand Down

0 comments on commit 6152641

Please sign in to comment.