7 #include "PlusConfigure.h" 11 #include "vtkIGSIOAccurateTimer.h" 17 #include <vtkMatrix4x4.h> 19 #include <vtkSmartPointer.h> 28 #include "ftkErrors.h" 30 #include "ftkInterface.h" 31 #include "ftkOptions.h" 32 #include "ftkPlatform.h" 36 #define ATR_SUCCESS AtracsysTracker::ATRACSYS_RESULT::SUCCESS 53 class vtkPlusAtracsysTracker::vtkInternal
62 this->DeviceOptionTranslator[
"MaxMeanRegistrationErrorMm"] =
"Registration Mean Error";
63 this->DeviceOptionTranslator[
"MaxMissingFiducials"] =
"Matching Maximum Missing Points";
64 this->DeviceOptionTranslator[
"SymmetriseCoordinates"] =
"Symmetrise coordinates";
65 this->DeviceOptionTranslator[
"EnableLasers"] =
"Enables lasers";
66 this->DeviceOptionTranslator[
"EnableUserLED"] =
"Enables the user-LED";
67 this->DeviceOptionTranslator[
"EnableIRstrobe"] =
"Enables IR strobe";
68 this->DeviceOptionTranslator[
"ImageCompressionThreshold"] =
"Image Compression Threshold";
69 this->DeviceOptionTranslator[
"ImageIntegrationTime"] =
"Image Integration Time";
72 virtual ~vtkInternal()
77 std::map<std::string, std::string> DeviceOptionTranslator;
79 std::map<std::string, std::string> DeviceOptions{};
82 int ActiveMarkerPairingTimeSec = 0;
83 float MaxMeanRegistrationErrorMm = 2.0;
84 int MaxMissingFiducials = 0;
87 std::map<std::string, std::string> PlusIdMappedToGeometryFilename;
90 std::map<int, std::string> FtkGeometryIdMappedToToolId;
102 , Internal(new vtkInternal(this))
104 LOG_TRACE(
"vtkPlusAtracsysTracker::vtkPlusAtracsysTracker()");
113 LOG_TRACE(
"vtkPlusAtracsysTracker::~vtkPlusAtracsysTracker()");
129 this->Internal->Tracker.GetSDKversion(
v);
137 this->Internal->Tracker.GetCalibrationDate(d);
144 switch (this->Internal->DeviceType)
146 case AtracsysTracker::DEVICE_TYPE::FUSIONTRACK_250:
147 return "fusionTrack250";
148 case AtracsysTracker::DEVICE_TYPE::FUSIONTRACK_500:
149 return "fusionTrack500";
150 case AtracsysTracker::DEVICE_TYPE::SPRYTRACK_180:
151 return "spryTrack180";
152 case AtracsysTracker::DEVICE_TYPE::SPRYTRACK_300:
153 return "spryTrack300";
161 std::array<float, 10>& leftIntrinsic, std::array<float, 10>& rightIntrinsic,
162 std::array<float, 3>& rightPosition, std::array<float, 3>& rightOrientation)
164 ATRACSYS_RESULT result = this->Internal->Tracker.GetCamerasCalibration(
165 leftIntrinsic, rightIntrinsic, rightPosition, rightOrientation);
168 LOG_ERROR(this->Internal->Tracker.ResultToString(result));
177 if (this->Internal->Tracker.GetLoadedGeometries(geometries) !=
ATR_SUCCESS)
179 LOG_ERROR(
"Could not get loaded geometries");
182 if (geometries.size() == 0)
184 LOG_ERROR(
"No loaded geometries");
193 return this->Internal->Tracker.IsVirtual();
202 for (
int i = 0;
i < deviceConfig->GetNumberOfAttributes(); ++
i)
204 this->Internal->DeviceOptions.emplace(deviceConfig->GetAttributeName(
i), deviceConfig->GetAttributeValue(
i));
206 this->
SetParameter(deviceConfig->GetAttributeName(
i), deviceConfig->GetAttributeValue(
i));
209 XML_FIND_NESTED_ELEMENT_REQUIRED(dataSourcesElement, deviceConfig,
"DataSources");
210 for (
int nestedElementIndex = 0; nestedElementIndex < dataSourcesElement->GetNumberOfNestedElements(); nestedElementIndex++)
212 vtkXMLDataElement* toolDataElement = dataSourcesElement->GetNestedElement(nestedElementIndex);
213 if (STRCASECMP(toolDataElement->GetName(),
"DataSource") != 0)
218 if (toolDataElement->GetAttribute(
"Type") != NULL && STRCASECMP(toolDataElement->GetAttribute(
"Type"),
"Tool") != 0)
223 std::string toolId(toolDataElement->GetAttribute(
"Id"));
227 LOG_ERROR(
"Failed to initialize Atracsys tool: DataSource Id is missing.");
237 TRACKING_TYPE toolTrackingType;
238 XML_READ_ENUM2_ATTRIBUTE_NONMEMBER_OPTIONAL(TrackingType, toolTrackingType, toolDataElement,
"ACTIVE", ACTIVE,
"PASSIVE", PASSIVE);
239 if (toolTrackingType == ACTIVE)
242 int ftkGeometryId = -1;
243 XML_READ_SCALAR_ATTRIBUTE_NONMEMBER_OPTIONAL(
int, GeometryId, ftkGeometryId, toolDataElement);
244 if (ftkGeometryId != -1)
246 std::pair<int, std::string> thisTool(ftkGeometryId, toolId);
247 this->Internal->FtkGeometryIdMappedToToolId.insert(thisTool);
251 LOG_ERROR(
"Active tool with Id " << toolId <<
" is missing a GeometryId");
255 else if (toolTrackingType == PASSIVE)
258 const char* geometryFile;
259 if ((geometryFile = toolDataElement->GetAttribute(
"GeometryFile")) != NULL)
261 std::pair<std::string, std::string> thisTool(toolId, geometryFile);
262 this->Internal->PlusIdMappedToGeometryFilename.insert(thisTool);
266 LOG_ERROR(
"Passive tool with Id " << toolId <<
" is missing GeometryFile (.ini).");
278 LOG_TRACE(
"vtkPlusAtracsysTracker::WriteConfiguration");
286 LOG_TRACE(
"vtkPlusAtracsysTracker::Probe");
293 return this->Internal->DeviceOptions;
299 std::map<std::string, std::string>::const_iterator itd = this->Internal->DeviceOptions.find(optionName);
300 if (itd != this->Internal->DeviceOptions.cend())
302 optionValue = this->Internal->DeviceOptions[optionName];
311 std::map<std::string, std::string>::const_iterator itt =
312 this->Internal->DeviceOptionTranslator.find(optionName);
313 if (itt == this->Internal->DeviceOptionTranslator.cend())
319 translatedOptionName = itt->second;
327 LOG_TRACE(
"vtkPlusAtracsysTracker::InternalConnect");
331 if (result !=
ATR_SUCCESS && result != AtracsysTracker::ATRACSYS_RESULT::WARNING_CONNECTED_IN_USB2)
333 LOG_ERROR(this->Internal->Tracker.ResultToString(result));
336 else if (result == AtracsysTracker::ATRACSYS_RESULT::WARNING_CONNECTED_IN_USB2)
338 LOG_WARNING(this->Internal->Tracker.ResultToString(result));
342 std::ostringstream oss;
344 this->Internal->Tracker.GetDeviceId(sn);
345 oss <<
"0x" << std::setw(16) << std::setfill(
'0') << std::hex << sn;
349 this->Internal->Tracker.GetDeviceType(this->Internal->DeviceType);
351 std::map<std::string, std::string>::const_iterator itd;
354 itd = this->Internal->DeviceOptions.find(
"ActiveMarkerPairingTimeSec");
355 if (itd != this->Internal->DeviceOptions.cend())
357 if (
strToInt32(itd->second, this->Internal->ActiveMarkerPairingTimeSec))
359 LOG_INFO(
"Marker pairing time is set to " << this->Internal->ActiveMarkerPairingTimeSec <<
" seconds, tracking will not start until this period is over.");
365 itd = this->Internal->DeviceOptions.find(
"MaxMeanRegistrationErrorMm");
366 if (itd != this->Internal->DeviceOptions.cend())
368 if (
strToFloat32(itd->second, this->Internal->MaxMeanRegistrationErrorMm))
370 if (this->Internal->MaxMeanRegistrationErrorMm < 0.1 || this->Internal->MaxMeanRegistrationErrorMm > 5.0)
372 this->Internal->MaxMeanRegistrationErrorMm = 2.0;
373 LOG_WARNING(
"Invalid maximum mean registration error provided. Must be between 0.1 and 5 mm inclusive. Maximum mean registration error has been set to its default value of " << this->Internal->MaxMeanRegistrationErrorMm <<
"mm.");
379 this->Internal->DeviceOptions.emplace(
"MaxMeanRegistrationErrorMm",
383 itd = this->Internal->DeviceOptions.find(
"MaxMissingFiducials");
384 if (itd != this->Internal->DeviceOptions.cend())
386 if (
strToInt32(itd->second, this->Internal->MaxMissingFiducials))
388 if (this->Internal->MaxMissingFiducials < 0 || this->Internal->MaxMissingFiducials > 3)
390 this->Internal->MaxMissingFiducials = 0;
391 LOG_WARNING(
"Invalid maximum number of missing fiducials provided. Must be between 0 and 3 inclusive. Maximum missing fiducials has been set to its default value of " << this->Internal->MaxMissingFiducials <<
".");
397 this->Internal->DeviceOptions.emplace(
"MaxMissingFiducials",
403 itd = this->Internal->DeviceOptions.find(
"MaxAdditionalEventsNumber");
404 if (itd != this->Internal->DeviceOptions.cend())
409 LOG_WARNING(
"Invalid value for max events number per frame in output: " << itd->second
410 <<
". Default value used (" << this->Internal->Tracker.GetMaxAdditionalEventsNumber() <<
")");
414 this->Internal->Tracker.SetMaxAdditionalEventsNumber(
value);
418 itd = this->Internal->DeviceOptions.find(
"Max2dFiducialsNumber");
419 if (itd != this->Internal->DeviceOptions.cend())
425 LOG_WARNING(
"Invalid value for max 2D fiducials number in output: " << itd->second
426 <<
". Default value used (" << this->Internal->Tracker.GetMax2dFiducialsNumber() <<
")");
430 this->Internal->Tracker.SetMax2dFiducialsNumber(
value);
434 itd = this->Internal->DeviceOptions.find(
"Max3dFiducialsNumber");
435 if (itd != this->Internal->DeviceOptions.cend())
441 LOG_WARNING(
"Invalid value for max 3D fiducials number in output: " << itd->second
442 <<
". Default value used (" << this->Internal->Tracker.GetMax3dFiducialsNumber() <<
")");
446 this->Internal->Tracker.SetMax3dFiducialsNumber(
value);
450 itd = this->Internal->DeviceOptions.find(
"MaxMarkersNumber");
451 if (itd != this->Internal->DeviceOptions.cend())
457 LOG_WARNING(
"Invalid value for max markers number in output: " << itd->second
458 <<
". Default value used (" << this->Internal->Tracker.GetMaxMarkersNumber() <<
")");
462 this->Internal->Tracker.SetMaxMarkersNumber(
value);
470 std::map<std::string, std::string>::iterator itr = this->Internal->DeviceOptions.find(
"Enable_embedded_processing");
471 if (itr != this->Internal->DeviceOptions.end())
473 if (this->Internal->DeviceOptions.at(
"Enable_embedded_processing") ==
"0")
477 LOG_WARNING(
"Embedded processing could not be disabled.");
478 this->Internal->DeviceOptions.erase(itr);
481 else if (this->Internal->DeviceOptions.at(
"Enable_embedded_processing") ==
"1")
485 this->Internal->DeviceOptions.erase(itr);
486 LOG_WARNING(
"Embedded processing could not be enabled.");
491 LOG_WARNING(this->Internal->DeviceOptions.at(
"Enable_embedded_processing") <<
" is not a correct value for Embedded processing.\nAccepted values are 0 (false) and 1 (true).");
492 this->Internal->DeviceOptions.erase(itr);
496 itr = this->Internal->DeviceOptions.begin();
497 while (itr != this->Internal->DeviceOptions.end())
499 std::string translatedOptionName;
502 if (itr->first ==
"EnableIRstrobe" && (this->Internal->DeviceType == AtracsysTracker::DEVICE_TYPE::FUSIONTRACK_500
503 || this->Internal->DeviceType == AtracsysTracker::DEVICE_TYPE::FUSIONTRACK_250))
507 std::map<std::string, std::string> strobCorresp{ {
"0",
"1"},{
"1",
"0"}, {
"2",
"2"} };
508 if (strobCorresp.find(itr->second) != strobCorresp.end())
510 if (this->Internal->Tracker.SetOption(
"Strobe mode", strobCorresp.at(itr->second)) !=
ATR_SUCCESS)
512 itr = this->Internal->DeviceOptions.erase(itr);
518 LOG_WARNING(
"Unsupported strobe mode value " << itr->second);
519 itr = this->Internal->DeviceOptions.erase(itr);
525 if (this->Internal->Tracker.SetOption(translatedOptionName, itr->second) !=
ATR_SUCCESS)
527 itr = this->Internal->DeviceOptions.erase(itr);
532 else if (itr->first.find(
'_') != std::string::npos && itr->first !=
"Enable_embedded_processing")
534 std::string inferredOptionName = itr->first;
535 std::replace(inferredOptionName.begin(), inferredOptionName.end(),
'_',
' ');
536 if (this->Internal->Tracker.SetOption(inferredOptionName, itr->second) !=
ATR_SUCCESS)
538 itr = this->Internal->DeviceOptions.erase(itr);
542 else if (itr->first !=
"AcquisitionRate" && itr->first !=
"Id" && itr->first !=
"Type" 543 && itr->first !=
"ToolReferenceFrame" && itr->first !=
"Enable_embedded_processing")
545 LOG_WARNING(
"Unknown option \"" << itr->first <<
"\".");
546 itr = this->Internal->DeviceOptions.erase(itr);
553 if (this->Internal->DeviceType == AtracsysTracker::DEVICE_TYPE::SPRYTRACK_180)
555 if ((result = this->Internal->Tracker.EnableWirelessMarkerStatusStreaming(
false)) !=
ATR_SUCCESS)
557 LOG_WARNING(this->Internal->Tracker.ResultToString(result));
559 if ((result = this->Internal->Tracker.EnableWirelessMarkerBatteryStreaming(
false)) !=
ATR_SUCCESS)
561 LOG_WARNING(this->Internal->Tracker.ResultToString(result));
566 std::map<std::string, std::string>::iterator it;
567 for (it = begin(this->Internal->PlusIdMappedToGeometryFilename); it != end(this->Internal->PlusIdMappedToGeometryFilename); it++)
573 if ((result = this->Internal->Tracker.LoadMarkerGeometryFromFile(geomFilePath, geometryId)) !=
ATR_SUCCESS)
575 LOG_ERROR(this->Internal->Tracker.ResultToString(result) <<
" This error occurred when trying to load geometry file at path: " << geomFilePath);
578 std::pair<int, std::string> newTool(geometryId, it->first);
579 this->Internal->FtkGeometryIdMappedToToolId.insert(newTool);
583 if (this->Internal->ActiveMarkerPairingTimeSec > 0)
586 this->Internal->Tracker.SetUserLEDState(0, 0, 255, 0);
589 if ((result = this->Internal->Tracker.EnableWirelessMarkerPairing(
true)) !=
ATR_SUCCESS)
591 LOG_ERROR(this->Internal->Tracker.ResultToString(result));
594 LOG_INFO(
"Active marker pairing period started for " << this->Internal->ActiveMarkerPairingTimeSec <<
" seconds.");
597 vtkIGSIOAccurateTimer::Delay(this->Internal->ActiveMarkerPairingTimeSec);
599 LOG_INFO(
"Active marker pairing period ended.");
601 if ((result = this->Internal->Tracker.EnableWirelessMarkerPairing(
false)) !=
ATR_SUCCESS)
603 LOG_ERROR(this->Internal->Tracker.ResultToString(result));
608 this->Internal->Tracker.SetUserLEDState(0, 255, 0, 0);
612 std::string markerInfo;
613 this->Internal->Tracker.GetMarkerInfo(markerInfo);
614 if (!markerInfo.empty())
616 LOG_INFO(
"Additional info about paired markers:" << markerInfo << std::endl);
626 LOG_TRACE(
"vtkPlusAtracsysTracker::InternalDisconnect");
627 this->Internal->Tracker.EnableUserLED(
false);
630 if ((result = this->Internal->Tracker.Disconnect()) !=
ATR_SUCCESS)
632 LOG_ERROR(this->Internal->Tracker.ResultToString(result));
639 PlusStatus vtkPlusAtracsysTracker::InternalStartRecording()
641 LOG_TRACE(
"vtkPlusAtracsysTracker::InternalStartRecording");
646 PlusStatus vtkPlusAtracsysTracker::InternalStopRecording()
648 LOG_TRACE(
"vtkPlusAtracsysTracker::InternalStopRecording");
655 LOG_TRACE(
"vtkPlusAtracsysTracker::PauseVirtualDevice");
656 this->Internal->Tracker.Pause(
true);
663 LOG_TRACE(
"vtkPlusAtracsysTracker::UnpauseVirtualDevice");
664 this->Internal->Tracker.Pause(
false);
671 LOG_TRACE(
"vtkPlusAtracsysTracker::InternalUpdate");
672 double unfilteredTimestamp = vtkIGSIOAccurateTimer::GetSystemTime();
674 std::vector<AtracsysTracker::Marker> markers;
675 std::map<std::string, std::string> events;
677 uint64_t sdkTimestamp = 0;
678 ATRACSYS_RESULT result = this->Internal->Tracker.GetMarkersInFrame(markers, events, sdkTimestamp);
680 if (result == AtracsysTracker::ATRACSYS_RESULT::ERROR_NO_FRAME_AVAILABLE)
687 LOG_ERROR(this->Internal->Tracker.ResultToString(result));
691 igsioFieldMapType customFields;
694 customFields[
"SdkTimestamp"].first = FRAMEFIELD_NONE;
695 customFields[
"SdkTimestamp"].second =
std::to_string(sdkTimestamp);
698 for (
const auto& it : events)
700 customFields[
"Event_" + it.first].first = FRAMEFIELD_NONE;
701 customFields[
"Event_" + it.first].second = it.second;
704 std::map<int, std::string>::iterator it;
705 for (it = this->Internal->FtkGeometryIdMappedToToolId.begin(); it != this->Internal->FtkGeometryIdMappedToToolId.end(); it++)
707 if (std::find(this->DisabledToolIds.begin(), this->DisabledToolIds.end(), it->second) != this->DisabledToolIds.end())
710 vtkNew<vtkMatrix4x4> emptyTransform;
711 igsioTransformName toolTransformName(it->second, this->GetToolReferenceFrameName());
712 std::string toolSourceId = toolTransformName.GetTransformName();
716 bool toolUpdated =
false;
718 std::vector<AtracsysTracker::Marker>::iterator mit;
719 for (mit = markers.begin(); mit != markers.end(); mit++)
721 if (it->first != (
int)mit->GetGeometryID())
726 if (mit->GetFiducialRegistrationErrorMm() > this->Internal->MaxMeanRegistrationErrorMm)
728 LOG_WARNING(
"Maximum mean marker fiducial registration error exceeded for tool: " << it->second);
736 std::ostringstream mos;
738 mos << std::fixed << mit->GetMarkerStatus() <<
" " << mit->GetTrackingID() <<
" ";
739 mos << mit->GetGeometryID() <<
" " << mit->GetGeometryPresenceMask() <<
" ";
740 mos << mit->GetFiducialRegistrationErrorMm() <<
" ";
741 mos << mit->GetFiducials().size();
742 customFields[it->second +
"_info"].first = FRAMEFIELD_NONE;
743 customFields[it->second +
"_info"].second = mos.str();
746 const auto& fids = mit->GetFiducials();
747 for (
unsigned int f = 0; f < fids.size(); f++)
750 std::ostringstream f3dos;
752 f3dos << std::fixed << fids[f].Fid3dStatus <<
" ";
753 f3dos << fids[f].xMm <<
" " << fids[f].yMm <<
" " << fids[f].zMm <<
" ";
754 f3dos << fids[f].epipolarErrorPx <<
" " << fids[f].probability <<
" " << fids[f].triangulErrorMm;
755 customFields[it->second +
"_fid" +
std::to_string(f) +
"_3D"].first = FRAMEFIELD_NONE;
756 customFields[it->second +
"_fid" +
std::to_string(f) +
"_3D"].second = f3dos.str();
758 std::ostringstream f2dLos;
760 f2dLos << std::fixed << fids[f].Fid2dLeftStatus <<
" ";
761 f2dLos << fids[f].xLeftPx <<
" " << fids[f].yLeftPx <<
" ";
762 f2dLos << fids[f].heightLeftPx <<
" " << fids[f].widthLeftPx <<
" ";
763 f2dLos << fids[f].pixCountLeft;
764 customFields[it->second +
"_fid" +
std::to_string(f) +
"_2D_L"].first = FRAMEFIELD_NONE;
765 customFields[it->second +
"_fid" +
std::to_string(f) +
"_2D_L"].second = f2dLos.str();
767 std::ostringstream f2dRos;
769 f2dRos << std::fixed << fids[f].Fid2dRightStatus <<
" ";
770 f2dRos << fids[f].xRightPx <<
" " << fids[f].yRightPx <<
" ";
771 f2dRos << fids[f].heightRightPx <<
" " << fids[f].widthRightPx <<
" ";
772 f2dRos << fids[f].pixCountRight;
773 customFields[it->second +
"_fid" +
std::to_string(f) +
"_2D_R"].first = FRAMEFIELD_NONE;
774 customFields[it->second +
"_fid" +
std::to_string(f) +
"_2D_R"].second = f2dRos.str();
778 igsioTransformName toolTransformName(it->second, this->GetToolReferenceFrameName());
779 std::string toolSourceId = toolTransformName.GetTransformName();
781 unfilteredTimestamp, &customFields);
787 vtkNew<vtkMatrix4x4> emptyTransform;
788 igsioTransformName toolTransformName(it->second, this->GetToolReferenceFrameName());
789 std::string toolSourceId = toolTransformName.GetTransformName();
791 unfilteredTimestamp, &customFields);
830 this->DisabledToolIds.erase(std::remove(this->DisabledToolIds.begin(), this->DisabledToolIds.end(), toolId), this->DisabledToolIds.end());
835 bool toolExists =
false;
836 std::map<int, std::string>::iterator it;
837 for (it = this->Internal->FtkGeometryIdMappedToToolId.begin(); it != this->Internal->FtkGeometryIdMappedToToolId.end(); it++)
839 if (igsioCommon::IsEqualInsensitive(it->second, toolId))
848 LOG_ERROR(
"Tried to disable non-existant tool.");
852 this->DisabledToolIds.push_back(toolId);
860 bool toolExists =
false;
861 std::map<int, std::string>::iterator it;
862 for (it = this->Internal->FtkGeometryIdMappedToToolId.begin(); it != this->Internal->FtkGeometryIdMappedToToolId.end(); it++)
864 if (igsioCommon::IsEqualInsensitive(it->second, toolId))
873 LOG_ERROR(
"Tried to add tool with conflicting ToolId (" << toolId <<
").");
879 if ((result = this->Internal->Tracker.LoadMarkerGeometryFromString(geomString, geometryId)) !=
ATR_SUCCESS)
881 LOG_ERROR(this->Internal->Tracker.ResultToString(result) <<
" This error occurred when trying to load the following geometry information: " << geomString);
886 vtkSmartPointer<vtkPlusDataSource> aToolSource = vtkSmartPointer<vtkPlusDataSource>::New();
889 aToolSource->SetId(toolId);
915 LOG_ERROR(
"Failed to get output channel when adding Atracsys geometry.");
918 outChannel->
AddTool(aToolSource);
927 std::pair<int, std::string> newTool(geometryId, toolId);
928 this->Internal->FtkGeometryIdMappedToToolId.insert(newTool);
std::string ToolReferenceFrameName
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *config)
static const char * ATRACSYS_COMMAND_SET_FLAG
PlusStatus AddToolGeometry(std::string toolId, std::string geomString)
Abstract interface for tracker and video devices.
const std::map< std::string, std::string > & GetDeviceOptions() const
PlusStatus SetLedEnabled(bool enabled)
~vtkPlusAtracsysTracker()
#define XML_FIND_DEVICE_ELEMENT_REQUIRED_FOR_WRITING(deviceConfig, rootConfigElement)
PlusStatus GetFirstOutputChannel(vtkPlusChannel *&aChannel)
virtual PlusStatus InternalDisconnect()
static const char * ATRACSYS_COMMAND_VIDEO_ENABLED
std::string GetSdkVersion()
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *config)
virtual PlusStatus SetParameter(const std::string &key, const std::string &value)
PlusStatus AddTool(vtkPlusDataSource *tool, bool requireUniquePortName=true)
virtual PlusStatus ToolTimeStampedUpdate(const std::string &aToolSourceId, vtkMatrix4x4 *matrix, ToolStatus status, unsigned long frameNumber, double unfilteredtimestamp, const igsioFieldMapType *customFields=NULL)
std::string to_string(ClariusAvailability avail)
PlusStatus SetLaserEnabled(bool enabled)
vtkStandardNewMacro(vtkPlusAtracsysTracker)
static const char * ATRACSYS_COMMAND_ENABLE_TOOL
PlusStatus AddTool(vtkPlusDataSource *aTool)
PlusStatus GetLoadedGeometries(std::map< int, std::vector< std::array< float, 3 >>> &geometries)
PlusStatus SetUserLEDState(int red, int green, int blue, int frequency, bool enabled=true)
static vtkPlusConfig * GetInstance()
static const char * ATRACSYS_COMMAND_LED_ENABLED
bool strToInt32(const std::string &str, int &var)
unsigned long FrameNumber
PlusStatus GetCamerasCalibration(std::array< float, 10 > &leftIntrinsic, std::array< float, 10 > &rightIntrinsic, std::array< float, 3 > &rightPosition, std::array< float, 3 > &rightOrientation)
PlusStatus UnpauseVirtualDevice()
static const char * ATRACSYS_COMMAND_LASER_ENABLED
std::string GetCalibrationDate()
double InternalUpdateRate
bool strToFloat32(const std::string &str, float &var)
std::string GetDeviceType()
#define XML_FIND_DEVICE_ELEMENT_REQUIRED_FOR_READING(deviceConfig, rootConfigElement)
bool TranslateOptionName(const std::string &optionName, std::string &translatedOptionName)
AtracsysTracker::ATRACSYS_RESULT ATRACSYS_RESULT
PlusStatus PauseVirtualDevice()
const char const char * value
static const char * ATRACSYS_COMMAND_SET_LED_RGBF
bool StartThreadForInternalUpdates
PlusStatus GetOptionValue(const std::string &optionName, std::string &optionValue)
void PrintSelf(ostream &os, vtkIndent indent)
Contains an optional timestamped circular buffer containing the video images and a number of timestam...
std::string GetDeviceSetConfigurationPath(const std::string &subPath)
static const char * ATRACSYS_COMMAND_ADD_TOOL
PlusStatus InternalUpdate()
PlusStatus InternalConnect()
PlusStatus SetToolEnabled(std::string toolId, bool enabled)
AtracsysTracker::DEVICE_TYPE DeviceType
PlusStatus SetVideoEnabled(bool enabled)
virtual bool IsVirtual() const
Interface to the Atracsys trackers This class talks with a Atracsys Tracker over the sTk Passive Trac...
Position vectors of rods v