Reusing parts of ZebraZoom
Reusing parts of ZebraZoom's tracking implementations​
Most of the ZebraZoom tracking code is split into various mixin classes, each containing methods related to specific parts of tracking algorithms (e.g. GetBackgroundMixin
, CenterOfMassTailTrackingMixin
, ComputeHeadingMixin
etc.). If you'd like to reuse some of those functionalities, your tracking class should inherit zebrazoom.code.tracking.BaseZebraZoomTrackingMethod
and any other mixins you intend to use. Please bear in mind that mixins provided by ZebraZoom will expect your class to have certain instance variables (e.g. _hyperparameters, _videoPath, _wellPositions etc.) and it is up to you to set them before calling methods implemented in mixins. A full list of the required instance variables for each mixin can be inferred from the code. Mixins can be found in files in tracking folder. If you want to, you can also reimplement some of the methods provided by mixins.
Examples​
All ZebraZoom tracking implementations (fasterMultiprocessing, fasterMultiprocessing2, tracking) already make use of this, and can serve as examples.