diff --git a/Src/CMakeLists.txt b/Src/CMakeLists.txt index b0570a31efa5aa390f5b78dde209899fa569510b..df3aecfb03ec2332b7de2562facc0dbd54df97d3 100644 --- a/Src/CMakeLists.txt +++ b/Src/CMakeLists.txt @@ -21,7 +21,7 @@ set_target_properties(${TN} PROPERTIES CXX_EXTENSIONS NO ) -target_compile_definitions(${TN} PRIVATE RF_INTERFACES_EXPORT) +target_compile_definitions(${TN} PRIVATE BT_INTERFACES_EXPORT) target_sources(${TN} PRIVATE @@ -48,6 +48,7 @@ PRIVATE ) set(${TN}_PUBLIC_HEADERS + "${CMAKE_CURRENT_LIST_DIR}/Interfaces/API.h" "${CMAKE_CURRENT_LIST_DIR}/Interfaces/ENUMS.h" "${CMAKE_CURRENT_LIST_DIR}/Interfaces/IBioTrackerContext.h" "${CMAKE_CURRENT_LIST_DIR}/Interfaces/IBioTrackerPlugin.h" diff --git a/Src/Interfaces/API.h b/Src/Interfaces/API.h new file mode 100644 index 0000000000000000000000000000000000000000..1ed37d78bc5f508a20f7f0c85e30d4051a8dfc82 --- /dev/null +++ b/Src/Interfaces/API.h @@ -0,0 +1,9 @@ +#pragma once + +#include <QtCore/qglobal.h> + +#if defined(BT_INTERFACES_EXPORT) + #define BT_INTERFACES_API Q_DECL_EXPORT +#else + #define BT_INTERFACES_API Q_DECL_IMPORT +#endif \ No newline at end of file diff --git a/Src/Interfaces/IBioTrackerContext.h b/Src/Interfaces/IBioTrackerContext.h index c1ca6883ebf8951fee3fea4216b10e1ba553cf6b..8c3f247ddddfa2c65e830c550111875a692e434d 100644 --- a/Src/Interfaces/IBioTrackerContext.h +++ b/Src/Interfaces/IBioTrackerContext.h @@ -5,10 +5,10 @@ #include "QMap" #include "QString" #include "Interfaces/ENUMS.h" - +#include <Interfaces/API.h> class IController; -class IBioTrackerContext : public QObject +class BT_INTERFACES_API IBioTrackerContext : public QObject { Q_OBJECT public: diff --git a/Src/Interfaces/IBioTrackerPlugin.h b/Src/Interfaces/IBioTrackerPlugin.h index 115eb82ca2122ac4db82768ee23c27e17413bfb0..10ad35a57bdb473c2615210194f14d98cd89654d 100644 --- a/Src/Interfaces/IBioTrackerPlugin.h +++ b/Src/Interfaces/IBioTrackerPlugin.h @@ -9,8 +9,9 @@ #include "Interfaces/IModel/IModelTrackedComponentFactory.h" #include "opencv2/core/core.hpp" #include "memory" +#include <Interfaces/API.h> -class IBioTrackerPlugin : public QObject +class BT_INTERFACES_API IBioTrackerPlugin : public QObject { Q_OBJECT public: diff --git a/Src/Interfaces/IController/IController.h b/Src/Interfaces/IController/IController.h index 616c224df4da6600e27c2c065352f4e9c5d066a9..e557ae394d937755db84e3f41bf2315f0a87bd85 100644 --- a/Src/Interfaces/IController/IController.h +++ b/Src/Interfaces/IController/IController.h @@ -10,9 +10,9 @@ #include "Interfaces/IModel/IModel.h" #include "Interfaces/IBioTrackerContext.h" #include "Interfaces/ENUMS.h" +#include <Interfaces/API.h> - -class IController : public QObject { +class BT_INTERFACES_API IController : public QObject { Q_OBJECT public: explicit IController(QObject *parent = 0, IBioTrackerContext *context = 0, ENUMS::CONTROLLERTYPE ctr = ENUMS::CONTROLLERTYPE::NO_CTR); diff --git a/Src/Interfaces/IModel/IModel.h b/Src/Interfaces/IModel/IModel.h index 171e4731fdc2c9f34b3528e523dcbe43d6356a33..82b36cb9d66e03035a18f261f26debb4839e9217 100644 --- a/Src/Interfaces/IModel/IModel.h +++ b/Src/Interfaces/IModel/IModel.h @@ -4,8 +4,8 @@ #include <QObject> #include "memory" - -class IModel : public QObject { +#include <Interfaces/API.h> +class BT_INTERFACES_API IModel : public QObject { Q_OBJECT public: explicit IModel(QObject *parent = 0); diff --git a/Src/Interfaces/IModel/IModelAreaDescriptor.h b/Src/Interfaces/IModel/IModelAreaDescriptor.h index 4f3efb48df3eeb29b053cec9ebe83bafdc643a8e..011668fd31afbbe43cfdde0bb69fcd11b52db4a5 100644 --- a/Src/Interfaces/IModel/IModelAreaDescriptor.h +++ b/Src/Interfaces/IModel/IModelAreaDescriptor.h @@ -4,30 +4,30 @@ #include <string.h> #include <cv.h> -class IModelAreaDescriptor :public IModel +class BT_INTERFACES_API IModelAreaDescriptor :public IModel { Q_OBJECT public: IModelAreaDescriptor(QObject *parent = 0) : IModel(parent) {}; //~IModelAreaDescriptor(); - -public: - - virtual bool inTrackingArea(cv::Point2f point_cm) = 0; - - /** - * Transform the provided pixel coordinates into world coordinates and return world coordinates. - * @param: pixelCoords, a list of points. - * @return: world coordinates in as a list. - */ - virtual cv::Point2f pxToCm(cv::Point point_px) = 0; - - /** - * Transform the provided pixel point into world coordinates and return world point. - * @param: point, a pixel point, used opencv point - * @return: world point. - */ + +public: + + virtual bool inTrackingArea(cv::Point2f point_cm) = 0; + + /** + * Transform the provided pixel coordinates into world coordinates and return world coordinates. + * @param: pixelCoords, a list of points. + * @return: world coordinates in as a list. + */ + virtual cv::Point2f pxToCm(cv::Point point_px) = 0; + + /** + * Transform the provided pixel point into world coordinates and return world point. + * @param: point, a pixel point, used opencv point + * @return: world point. + */ virtual cv::Point2f cmToPx(cv::Point2f point_cm) = 0; public: diff --git a/Src/Interfaces/IModel/IModelDataExporter.h b/Src/Interfaces/IModel/IModelDataExporter.h index c33168f493f1f0b15685bd0fee7191c64d5d0429..4d4f7ac46cc9e1e4e4d6a77f53018eafb053c583 100644 --- a/Src/Interfaces/IModel/IModelDataExporter.h +++ b/Src/Interfaces/IModel/IModelDataExporter.h @@ -5,12 +5,12 @@ #include "Interfaces/IModel/IModelTrackedComponent.h" #include <string.h> #include <qfileinfo.h> -/** -* Interface for the data exporters in the core app -* Besides serializing to files also includes deserializing from files -* Current exporters are CSV, generic and JSON. +/** +* Interface for the data exporters in the core app +* Besides serializing to files also includes deserializing from files +* Current exporters are CSV, generic and JSON. */ -class IModelDataExporter :public IModel +class BT_INTERFACES_API IModelDataExporter :public IModel { Q_OBJECT diff --git a/Src/Interfaces/IModel/IModelTrackedComponent.h b/Src/Interfaces/IModel/IModelTrackedComponent.h index cc47f9d5354c0e1bcf10909fac4af92456c7a391..db2943b74b59c5e421246910d0d453e12aa6f092 100644 --- a/Src/Interfaces/IModel/IModelTrackedComponent.h +++ b/Src/Interfaces/IModel/IModelTrackedComponent.h @@ -23,7 +23,7 @@ * Blank component */ -class IModelTrackedComponent : public IModel +class BT_INTERFACES_API IModelTrackedComponent : public IModel { Q_OBJECT /* @@ -85,7 +85,7 @@ QDataStream &operator>>(QDataStream &in, IModelTrackedComponent &painting); * and the width and height (in px and _coordinateUnit) *******************************************************************************/ -class IModelComponentEuclidian2D : public IModelTrackedComponent { +class BT_INTERFACES_API IModelComponentEuclidian2D : public IModelTrackedComponent { public: Q_OBJECT /* @@ -172,7 +172,7 @@ protected: * It expands it from 2D to 3D. * Reserved for future 3D tracking. *******************************************************************************/ -class IModelComponentEuclidian3D : public IModelComponentEuclidian2D { +class BT_INTERFACES_API IModelComponentEuclidian3D : public IModelComponentEuclidian2D { public: Q_OBJECT /* @@ -224,7 +224,7 @@ protected: * This class is derived from IModelComponentEuclidian2D. * It expands it to 2D with timestamps. *******************************************************************************/ -class IModelComponentTemporal2D : public IModelComponentEuclidian2D { +class BT_INTERFACES_API IModelComponentTemporal2D : public IModelComponentEuclidian2D { public: Q_OBJECT /* @@ -263,7 +263,7 @@ protected: * A circular point will be visualized with the radius of min(width,height) * The position is the center of the point. *******************************************************************************/ -class IModelTrackedPoint : public IModelComponentTemporal2D +class BT_INTERFACES_API IModelTrackedPoint : public IModelComponentTemporal2D { Q_OBJECT @@ -282,7 +282,7 @@ public: * An irregular polygon defined by a list of polygons will be visualized. *******************************************************************************/ -class IModelTrackedPolygon : public IModelComponentTemporal2D +class BT_INTERFACES_API IModelTrackedPolygon : public IModelComponentTemporal2D { Q_OBJECT @@ -311,7 +311,7 @@ protected: * This interface can be visualized in the core application if the tracking data implements it. * An ellipse will be visualized. The position is the center of the ellipse. *******************************************************************************/ -class IModelTrackedEllipse : public IModelTrackedPoint +class BT_INTERFACES_API IModelTrackedEllipse : public IModelTrackedPoint { Q_OBJECT @@ -330,7 +330,7 @@ public: * This interface can be visualized in the core application if the tracking data implements it. * A rectangle will be visualized. The position is the center of the rectangle. *******************************************************************************/ -class IModelTrackedRectangle : public IModelTrackedPoint +class BT_INTERFACES_API IModelTrackedRectangle : public IModelTrackedPoint { Q_OBJECT diff --git a/Src/Interfaces/IModel/IModelTrackedComponentFactory.h b/Src/Interfaces/IModel/IModelTrackedComponentFactory.h index 4fe0b2117307260127c4b1af7d72bfd87c391e98..eab73625acce9b608dcbbb896ed6b630a8edcdb2 100644 --- a/Src/Interfaces/IModel/IModelTrackedComponentFactory.h +++ b/Src/Interfaces/IModel/IModelTrackedComponentFactory.h @@ -4,7 +4,7 @@ #include "Interfaces/IModel/IModel.h" #include "Interfaces/IModel/IModelTrackedComponent.h" -class IModelTrackedComponentFactory : public IModel +class BT_INTERFACES_API IModelTrackedComponentFactory : public IModel { Q_OBJECT diff --git a/Src/Interfaces/IModel/IModelTrackedTrajectory.h b/Src/Interfaces/IModel/IModelTrackedTrajectory.h index b608972103fcbc33723129dea509c2cf6ced559e..7d791a91886d057e8c0132ac76e00d05d873907e 100644 --- a/Src/Interfaces/IModel/IModelTrackedTrajectory.h +++ b/Src/Interfaces/IModel/IModelTrackedTrajectory.h @@ -12,7 +12,7 @@ * * Its the Plugin Developers full responsibility to choos an internal data structure. This could be e.g. Map, List or Vector. */ -class IModelTrackedTrajectory : public IModelTrackedComponent +class BT_INTERFACES_API IModelTrackedTrajectory : public IModelTrackedComponent { Q_OBJECT Q_PROPERTY(QList<IModelTrackedComponent*> childNodes READ getChildNodes() WRITE setChildNodes STORED hasChildNodes); diff --git a/Src/Interfaces/IModel/IModelTrackingAlgorithm.h b/Src/Interfaces/IModel/IModelTrackingAlgorithm.h index 722ffef62a4306febf31859e8d7f39f3d56a8073..1841eb8813285997c73ec6f1cd88e54f79756e4d 100644 --- a/Src/Interfaces/IModel/IModelTrackingAlgorithm.h +++ b/Src/Interfaces/IModel/IModelTrackingAlgorithm.h @@ -4,7 +4,7 @@ #include "IModel.h" #include "opencv2/core/core.hpp" -class IModelTrackingAlgorithm :public IModel { +class BT_INTERFACES_API IModelTrackingAlgorithm :public IModel { Q_OBJECT public: IModelTrackingAlgorithm(QObject *parent = 0); diff --git a/Src/Interfaces/IModel/IObject.h b/Src/Interfaces/IModel/IObject.h index 715e389463dfa14ddc35a303f39c0f79c40d02fb..0a7d9dc8c1fd1c7207b809159397eb912684d7ea 100644 --- a/Src/Interfaces/IModel/IObject.h +++ b/Src/Interfaces/IModel/IObject.h @@ -5,7 +5,7 @@ // #include "biotracker/util/platform.h" -class IObject : public IModel { +class BT_INTERFACES_API IObject : public IModel { Q_OBJECT public: IObject(); diff --git a/Src/Interfaces/IModel/Serializable.h b/Src/Interfaces/IModel/Serializable.h index d7083b5ec3ae6da0978fdb6636499000ae56f54c..50f629a65d640ac6cbfdadb4604c360db0df6cb7 100644 --- a/Src/Interfaces/IModel/Serializable.h +++ b/Src/Interfaces/IModel/Serializable.h @@ -4,8 +4,9 @@ #include <qobject.h> #include <QList> #include <QObject> +#include "IModel.h" -class Serializable : public QObject +class BT_INTERFACES_API Serializable : public IModel { Q_OBJECT }; diff --git a/Src/Interfaces/IView/IView.h b/Src/Interfaces/IView/IView.h index 554a7b32e23049ecfa4b999ff00928e6f1d6c509..5897b690aaf320a128d7447694d5d27eece3830d 100644 --- a/Src/Interfaces/IView/IView.h +++ b/Src/Interfaces/IView/IView.h @@ -3,9 +3,9 @@ #include "Interfaces/IModel/IModel.h" #include "Interfaces/ENUMS.h" - +#include <Interfaces/API.h> class IController; -class IView { +class BT_INTERFACES_API IView { public: IView(IController *controller = 0, IModel *model = 0); diff --git a/Src/Interfaces/IView/IViewGraphicsPixmapItem.h b/Src/Interfaces/IView/IViewGraphicsPixmapItem.h index 16cf08a959c9ad3b27df73d5c9b4c1ca69326cbb..5302abc032b97884d33786f2be8e6821bedb2949 100644 --- a/Src/Interfaces/IView/IViewGraphicsPixmapItem.h +++ b/Src/Interfaces/IView/IViewGraphicsPixmapItem.h @@ -5,7 +5,7 @@ #include "QObject" #include "QGraphicsPixmapItem" -class IViewGraphicsPixmapItem : public QObject, public QGraphicsPixmapItem, public IView +class BT_INTERFACES_API IViewGraphicsPixmapItem : public QObject, public QGraphicsPixmapItem, public IView { Q_OBJECT public: diff --git a/Src/Interfaces/IView/IViewGraphicsScene.h b/Src/Interfaces/IView/IViewGraphicsScene.h index 6b2e0db6b2a06ef92b3edaf219323ed58729fb3a..0ed22f430e6fdab0f36ef74f801daa1cc6df43fc 100644 --- a/Src/Interfaces/IView/IViewGraphicsScene.h +++ b/Src/Interfaces/IView/IViewGraphicsScene.h @@ -4,7 +4,7 @@ #include "QGraphicsScene" #include "IView.h" -class IViewGraphicsScene : public QGraphicsScene, public IView +class BT_INTERFACES_API IViewGraphicsScene : public QGraphicsScene, public IView { Q_OBJECT public: diff --git a/Src/Interfaces/IView/IViewGraphicsView.h b/Src/Interfaces/IView/IViewGraphicsView.h index 486288d8b64ac6412b7538608d12c22969d9f3ac..05be9e56d18b5328830532a1b030d45b620eeb0d 100644 --- a/Src/Interfaces/IView/IViewGraphicsView.h +++ b/Src/Interfaces/IView/IViewGraphicsView.h @@ -4,7 +4,7 @@ #include "QGraphicsView" #include "IView.h" -class IViewGraphicsView : public QGraphicsView, public IView +class BT_INTERFACES_API IViewGraphicsView : public QGraphicsView, public IView { Q_OBJECT public: diff --git a/Src/Interfaces/IView/IViewMainWindow.h b/Src/Interfaces/IView/IViewMainWindow.h index e61939e7268f6ec79958ccd83e1fe81de5bf13fd..8c0fdb5a569e65de3a560ddbf35a2831b853850c 100644 --- a/Src/Interfaces/IView/IViewMainWindow.h +++ b/Src/Interfaces/IView/IViewMainWindow.h @@ -4,7 +4,7 @@ #include <QMainWindow> #include "Interfaces/IView/IView.h" -class IViewMainWindow : public QMainWindow, public IView { +class BT_INTERFACES_API IViewMainWindow : public QMainWindow, public IView { public: IViewMainWindow(QWidget *parent = 0, IController *controller = 0, IModel *model = 0); ~IViewMainWindow(); diff --git a/Src/Interfaces/IView/IViewOpenGLWidget.h b/Src/Interfaces/IView/IViewOpenGLWidget.h index e3a23b47397b4d7348d1889cf873e7bbdf24f0d6..f2f66f5688f3429b8f44b97eac211b696e3b9590 100644 --- a/Src/Interfaces/IView/IViewOpenGLWidget.h +++ b/Src/Interfaces/IView/IViewOpenGLWidget.h @@ -7,7 +7,7 @@ #include <QOpenGLFunctions> -class IViewOpenGLWidget: public QOpenGLWidget, protected QOpenGLFunctions, public IView { +class BT_INTERFACES_API IViewOpenGLWidget: public QOpenGLWidget, protected QOpenGLFunctions, public IView { public: IViewOpenGLWidget(QWidget *parent = 0, IController *controller = 0, IModel *model = 0); ~IViewOpenGLWidget(); diff --git a/Src/Interfaces/IView/IViewTrackedComponent.h b/Src/Interfaces/IView/IViewTrackedComponent.h index d2cc6df389578f1b943b65bf337f995d92b7cd66..ff7e0da177b5bfda26e018bf8bf0cd54afbbdc37 100644 --- a/Src/Interfaces/IView/IViewTrackedComponent.h +++ b/Src/Interfaces/IView/IViewTrackedComponent.h @@ -10,7 +10,7 @@ * A IViewTrackedComponent has a QGraphicsItem. */ -class IViewTrackedComponent : public QGraphicsObject, public IView +class BT_INTERFACES_API IViewTrackedComponent : public QGraphicsObject, public IView { Q_OBJECT public: diff --git a/Src/Interfaces/IView/IViewWidget.h b/Src/Interfaces/IView/IViewWidget.h index 375ffd45756dd8e56cc44290f64bba84ec8da51f..fc97f0586f58b05a486aa420663c5e3202f2f630 100644 --- a/Src/Interfaces/IView/IViewWidget.h +++ b/Src/Interfaces/IView/IViewWidget.h @@ -4,7 +4,7 @@ #include <QWidget> #include "Interfaces/IView/IView.h" -class IViewWidget : public QWidget, public IView { +class BT_INTERFACES_API IViewWidget : public QWidget, public IView { Q_OBJECT public: explicit IViewWidget(QWidget *parent = 0, IController *controller = 0, IModel *model = 0);