FlowSDK  3.701
Structure from motion and Multiview stereo Interfaces
SamanthaInterface.h
1 /*
2  *
3  * C@@o ____ _____ __ _
4  * oC8@@@@@@@o |___ \| __ \ / _| |
5  * o@@@@@@@@@@@@O __) | | | | |_| | _____ __
6  * O@O 8@@@@@@@@@O |__ <| | | | _| |/ _ \ \ /\ / /
7  * o@@@@@@@O OOOOOCo ___) | |__| | | | | (_) \ V V /
8  * C@@@@@@@@@@@@Oo |____/|_____/|_| |_|\___/ \_/\_/
9  * o8@@@@@@@@@@@@@@@@8OOCCCC
10  * oO@@@@@@@@@@@@@@@@@@@o 3Dflow s.r.l. - www.3dflow.net
11  * oO8@@@@@@@@@@@@o Copyright 2017
12  * oO88@@@@@@@@8OCo All Rights Reserved
13  * O@@@@@@@@@@@@@@@@@@@@@@@@@8OCCoooooooCCo
14  * @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O
15  * @@@Oo oO8@@@@@@@@@@@@@@@@8
16  *
17  */
18 
19 #ifndef SAMANTHAINTERFACE_H
20 #define SAMANTHAINTERFACE_H
21 
22 #pragma once
23 
24 namespace FlowCore
25 {
26  class ProgressBar;
27  class LogListener;
28  class Settings;
29 }
30 
31 namespace FlowSaM
32 {
35  {
36  __declspec( dllexport ) CameraInterface();
37  __declspec( dllexport ) ~CameraInterface();
38 
40  char mFilePath[ 1024 ];
42  double mPPM[ 12 ];
44  double mA[ 9 ];
46  double mRadialDistorsion[ 5 ];
48  unsigned int mVisiblePointsCount = 0;
50  unsigned int *mVisiblePoints = nullptr;
52  double *mVisiblePointsCoords = nullptr;
54  bool mUseFixedInternalParameters = false;
55  };
56 
59  {
60  __declspec( dllexport ) PointCloudInterface();
61  __declspec( dllexport ) ~PointCloudInterface();
62 
64  double *mPositions;
66  unsigned char *mColors;
68  unsigned int mNumberOfPoints;
69  };
70 
73  {
74  public:
75 
77  virtual void setPointCloud( PointCloudInterface *pointCloud ) = 0;
79  virtual void addCamera( CameraInterface *camera ) = 0;
80 
82  virtual void setSettingValue( const char *nCategory, const char *nSettingName, const char *nValue ) = 0;
84  virtual void setLogListener( FlowCore::LogListener *logListener ) = 0;
86  virtual void setProgressBar( FlowCore::ProgressBar *progressBar ) = 0;
88  virtual unsigned int getCameraCount() const = 0;
90  virtual bool abort() = 0;
91 
102  virtual int compute() = 0;
103 
112  virtual bool triangulatePoint( unsigned int numberOfTracks, const unsigned int *imageIndexes, const double *imageCoords, double out3DPosition[ 3 ] ) = 0;
113  };
114 
115  struct SamanthaInterfaceData;
116 
119  {
120  public:
121 
123  virtual ~SamanthaInterface();
124 
126  virtual void setPointCloud( PointCloudInterface *pointCloud );
128  virtual void addCamera( CameraInterface *camera );
175  virtual void setSettingValue( const char *nCategory, const char *nSettingName, const char *nValue );
177  virtual void setLogListener( FlowCore::LogListener *logListener );
179  virtual void setProgressBar( FlowCore::ProgressBar *progressBar );
181  virtual unsigned int getCameraCount() const;
183  virtual bool abort();
184 
195  virtual int compute();
196 
205  virtual bool triangulatePoint( unsigned int numberOfTracks, const unsigned int *imageIndexes, const double *imageCoords, double out3DPosition[ 3 ] );
206 
207  private:
208 
209  SamanthaInterfaceData *mData;
210  };
211 
213  __declspec( dllexport ) SamanthaVInterface * CreateSamanthaInterfaceObject();
214 }
215 
216 #ifndef LOGLISTENER_H
217 #define LOGLISTENER_H
218 
219 namespace FlowCore
220 {
222  enum class LogType
223  {
224  Normal,
225  Warning,
226  Error,
227  Info
228  };
229 
235  class LogListener
236  {
237  public:
238 
240  virtual void messageLogged( const char *nMessage ) = 0;
241 
243  virtual void typeChanged( LogType type ){}
244  };
245 }
246 
247 #endif
248 
249 #ifndef PROGRESSBAR_H
250 #define PROGRESSBAR_H
251 
252 namespace FlowCore
253 {
259  class ProgressBar
260  {
261  public:
262 
264  virtual void start( const char *nWindowTitle, bool nShowGlobalProgress = false, bool nShowCancelButton = true ) = 0;
265 
267  virtual void finish() = 0;
268 
270  virtual void resetTicks( unsigned int nTicks, const char *nLoadingText = "" ) = 0;
271 
273  virtual void resetGlobalTicks( unsigned int nGlobalTicks, const char *nLoadingText = "" ) = 0;
274 
276  virtual void update( const char *nLoadingName ) = 0;
277 
279  virtual void updateGlobal( const char *nLoadingName ) = 0;
280  };
281 }
282 
283 #endif
284 
285 #endif
Samantha pure virtual interface class.
Definition: SamanthaInterface.h:72
virtual void typeChanged(LogType type)
Called when the current log type has changed.
Definition: SamanthaInterface.h:243
Store a PointCloud object. Nothing needed in input. Everything will be filled by samantha.
Definition: SamanthaInterface.h:58
Samantha dll interface.
Definition: SamanthaInterface.h:118
Store a simple camera object for the samantha interface. Just fill the filepath, the others parameter...
Definition: SamanthaInterface.h:34
Definition: LogListener.h:22
unsigned int mNumberOfPoints
Total Number of reconstructed points.
Definition: SamanthaInterface.h:68
unsigned char * mColors
Point colors (3xNumber of points)
Definition: SamanthaInterface.h:66
double * mPositions
Point positions (3xNumber of points)
Definition: SamanthaInterface.h:64
Pure virtual Log Listener interface.
Definition: LogListener.h:29
Pure virtual Progress Bar interface.
Definition: ProgressBar.h:29
Definition: SamanthaInterface.h:31