Medical Imaging Interaction Toolkit
2023.12.00
Medical Imaging Interaction Toolkit
|
If you want to implement your own Tracking device, you need to do the following (see e.g. mitk::VirtualTrackerTypeInformation):
Recommended steps (but not necessary):
Provide a static method to get your tracking device name.
Recommended:
Use this method in your constructor for step 2a) and 2b).
This method will make it easier to implement options for your device in any other Module/Plugin. If you want to check if the device in use is your device, you need to compare the names - and this can now be done in any Plugin just by calling this static method. And if you later on decide to change the name of your device into "my One And Only Device" - there is only one line of code you'll have to adapt.
Attention: If you change the name, you must edit all tool storages which were saved, e.g. using The MITK-IGT Navigation Tool Manager .
Attention: You should use a static method instead of static variables due to the initialization order of static variables and the autoload module.
Register your Tracking Device to the collection:
You can do the registration anywhere in your code, also from external projects. We recommend doing the registration of your tracking device in the autoload function of your module. Devices, which should be always available (e.g. Polaris, Aurora, Virtual, ...) are registered in mitk::IGTActivator.
Your tracking device should now be available in other Plugins, e.g. The MITK-IGT Tracking Toolbox .