  Electromagnetic tracking (EMT) is a core platform technology in the
navigation and visualisation of image-guided procedures. The technology
provides high tracking accuracy in non-line-of-sight environments, allowing
instrument navigation in locations where optical tracking is not feasible.
Integration of EMT in complex procedures, often coupled with multi-modal
imaging, is on the rise, yet the lack of exibility in the available hardware
platforms has been noted by many researchers and system designers. Advances in
the field of EMT include novel methods of improving tracking system accuracy,
precision and error compensation capabilities, though such system-level
improvements cannot be readily incorporated in current therapy applications due
to the `blackbox' nature of commercial tracking solving algorithms. This paper
defines a software framework to allow novel EMT designs and improvements become
part of the global design process for image-guided interventions. In an effort
to standardise EMT development, we define a generalised cross-platform software
framework in terms of the four system functions common to all EMT systems;
acquisition, filtering, modelling and solving. The interfaces between each
software component are defined in terms of their input and output data
structures. An exemplary framework is implemented in the Python programming
language and demonstrated with the open-source Anser EMT system. Performance
metrics are gathered from both Matlab and Python implementations of Anser EMT
considering the host operating system, hardware configuration and acquisition
settings used. Results show indicative system latencies of 5 ms can be achieved
using the framework on a Windows operating system, with decreased system
performance observed on UNIX-like platforms.
