theonlineoasis

VideoCodec/Modules/Inspection/External.h

#ifndef EXTERNAL_H_ #define EXTERNAL_H_ #include "../../Logger.h" #include "../../Data/Constants.h" #include "../Module.h" // If Matlab is enabled, use its header to access the Matlab engine. #ifdef USE_MATLAB // The command which runs Matlab, used by the engine. #define MATLAB_RUN_COMMAND "/opt/matlab/etc/bin/matlab" #include <engine.h> #define EXTERNAL_ENABLED #endif // Octave support is built in. #ifdef USE_OCTAVE #include "../../External/Octave/engine.h" #define EXTERNAL_ENABLED #endif #ifndef USE_MATLAB typedef void mxArray; #endif #include <sstream> namespace VideoCodec {    class External : public VideoCodec::Module    {    public:       External();       virtual ~External();       ConfigurationStatus Configure(ConfigurationElement* configuration);       void Execute(std::string command);       void ShowPieChart(double* values, unsigned int count);       void ShowImage(UnsignedByte* values, unsigned char columns, unsigned char rows);       void ShowImage(SignedShort* values, unsigned char columns, unsigned char rows);       void ShowVectorField(SignedByte* xComponents, SignedByte* yComponents, unsigned char columns, unsigned char rows, unsigned char vectorScaleFactor);       void ShowPackedRGBImage(UnsignedByte* values, unsigned short pixelColumns, unsigned short pixelRows);    private: #ifdef EXTERNAL_ENABLED       Engine* engine; #endif       void showMatlabImage(mxArray* mValues);    }; } #endif /*EXTERNAL_H_*/