Package algorithm

Class TrackingService

java.lang.Object
algorithm.TrackingService

public final class TrackingService extends Object
This class is used to manage the access to the OpenIGTLink-Connection and therefore to the trackers. It is a singleton in order to provide the same reference to all users. It should be used to get the reference to the currently active TrackingService, DataService and Timeline.
  • Method Details

    • getInstance

      public static TrackingService getInstance()
      Returns the instance. This class is a singleton, which means that there only is one and the same instance at a time.
      Returns:
      The instance
    • registerObserver

      public void registerObserver(TrackingServiceObserver observer)
      Register an observer. Observers are triggered when the references to any attribute are changed.
      Parameters:
      observer - The observer that shall be triggered
    • changeTrackingSource

      public void changeTrackingSource(AbstractTrackingDataSource trackingDataSource)
      Sets the reference to the tracking source.
      Parameters:
      trackingDataSource - The new tracking source
    • changeDataService

      public void changeDataService(DataService dataService)
      Sets the reference to the data service.
      Parameters:
      dataService - the new dataservice
    • changeTimeline

      public void changeTimeline(javafx.animation.Timeline timeline)
      Sets the reference to the timeline object.
      Parameters:
      timeline - The new timeline
    • getTrackingDataSource

      public AbstractTrackingDataSource getTrackingDataSource()
      Returns the reference to the tracking source
      Returns:
      The currently active tracking source
    • getDataService

      public DataService getDataService()
      Returns the reference to the data service
      Returns:
      The currently active data service
    • getTimeline

      public javafx.animation.Timeline getTimeline()
      Returns the reference to the timeline
      Returns:
      The currently active timeline