Hi Matt,
Please let me point you to the first line of your code snippet:
The enum value of mitk::NDIAurora is assigned to deviceData.Line in the
if-statement. I think a comparison is intended here.
Maybe this is the reason for only reaching one case if I understood your
description correctly.
During the last months, we put some effort in refactoring some parts of IGT by
using a more object-oriented and service-oriented approach (see bug
http://bugs.mitk.org/show_bug.cgi?id=19404):
We got rid of hardcoded tracking device types and encapsulated the behaviour of
each device type in separate classes. The tracking device types can now be
registered via microservices. This code is already integrated in the master
branch. Additional documentation will follow.
I hope that helps.
Best,
Matthias
Von: Clarkson, Matt [mailto:m.clark...@ucl.ac.uk]
Gesendet: Dienstag, 23. Februar 2016 14:34
An: MITK <mitk-users@lists.sourceforge.net>
Betreff: [mitk-users] Why does Aurora/Spectra have different behaviour w.r.t.
TrackingDeviceSourceConfigurator
Hi there,
I tried using MITK IGT to connect to both Aurora and Spectra. I ended up with
the code below. I could not get the Spectra to work without the
TrackingDeviceSourceConfigurator and I could not get the Aurora to work with
it. Is there any way to avoid this if/else? Is this expected behaviour? Is it
possible to startup trackers in a consistent fashion?
Im using 2015.05.2 if that helps.
Thanks
Matt
if (deviceData.Line = mitk::NDIAurora)
{
try
{
m_TrackerDevice->OpenConnection();
m_TrackerDevice->StartTracking();
}
catch(const mitk::Exception& e)
{
MITK_WARN << "Caught exception during construction, but carrying on
regardless:" << e;
}
m_TrackerSource = mitk::TrackingDeviceSource::New();
m_TrackerSource->SetTrackingDevice(m_TrackerDevice);
}
else
{
mitk::TrackingDeviceSourceConfigurator::Pointer myConfigurator =
mitk::TrackingDeviceSourceConfigurator::New(m_NavigationToolStorage,
m_TrackerDevice.GetPointer());
m_TrackerSource = myConfigurator->CreateTrackingDeviceSource();
try
{
m_TrackerDevice->OpenConnection();
m_TrackerDevice->StartTracking();
}
catch(const mitk::Exception& e)
{
MITK_WARN << "Caught exception during construction, but carrying on
regardless:" << e;
}
}
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users