CapturePluginPtgrey.h
Go to the documentation of this file.
00001 /*
00002  * This file is part of ALVAR, A Library for Virtual and Augmented Reality.
00003  *
00004  * Copyright 2007-2012 VTT Technical Research Centre of Finland
00005  *
00006  * Contact: VTT Augmented Reality Team <alvar.info@vtt.fi>
00007  *          <http://www.vtt.fi/multimedia/alvar.html>
00008  *
00009  * ALVAR is free software; you can redistribute it and/or modify it under the
00010  * terms of the GNU Lesser General Public License as published by the Free
00011  * Software Foundation; either version 2.1 of the License, or (at your option)
00012  * any later version.
00013  *
00014  * This library is distributed in the hope that it will be useful, but WITHOUT
00015  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00016  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
00017  * for more details.
00018  *
00019  * You should have received a copy of the GNU Lesser General Public License
00020  * along with ALVAR; if not, see
00021  * <http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html>.
00022  */
00023 
00024 #ifndef CAPTUREPLUGINPTGREY_H
00025 #define CAPTUREPLUGINPTGREY_H
00026 
00036 #ifdef WIN32
00037     #ifdef ALVAR_Capture_Plugin_Ptgrey_BUILD
00038         #define ALVAR_CAPTURE_PLUGIN_PTGREY_EXPORT __declspec(dllexport)
00039     #else
00040         #define ALVAR_CAPTURE_PLUGIN_PTGREY_EXPORT __declspec(dllimport)
00041     #endif
00042 #else
00043     #define ALVAR_CAPTURE_PLUGIN_PTGREY_EXPORT
00044 #endif
00045 
00046 #include "Capture.h"
00047 #include "CapturePlugin.h"
00048 
00049 #include "FlyCapture2Defs.h"
00050 
00051 // Forward declaration for PTGrey specific classes.
00052 namespace FlyCapture2 {
00053   class Camera; 
00054   class Image;
00055 }
00056 
00057 namespace alvar {
00058   
00062 namespace plugins {
00063 
00070 class ALVAR_CAPTURE_PLUGIN_PTGREY_EXPORT CapturePtgrey
00071     : public alvar::Capture
00072 {
00073 public:
00079     CapturePtgrey(const CaptureDevice captureDevice);
00083     ~CapturePtgrey();
00084     bool start();
00085     void stop();
00086     IplImage *captureImage();
00087     bool showSettingsDialog();
00088     std::string SerializeId();
00089     bool Serialize(Serialization *serialization);
00090 private:
00091     FlyCapture2::Camera *mCamera;
00092     FlyCapture2::Image *mImage;
00093     FlyCapture2::PGRGuid mGUID;
00094     int mChannels;
00095     IplImage *mReturnFrame;
00096 };
00097 
00104 class ALVAR_CAPTURE_PLUGIN_PTGREY_EXPORT CapturePluginPtgrey
00105     : public alvar::CapturePlugin
00106 {
00107 public:
00113     CapturePluginPtgrey(const std::string &captureType);
00117     ~CapturePluginPtgrey();
00118     CaptureDeviceVector enumerateDevices();
00119     Capture *createCapture(const CaptureDevice captureDevice);
00120 };
00121 
00122 extern "C" ALVAR_CAPTURE_PLUGIN_PTGREY_EXPORT void registerPlugin(const std::string &captureType, alvar::CapturePlugin *&capturePlugin);
00123 
00124 } // namespace plugins
00125 } // namespace alvar
00126 
00127 #endif


ar_track_alvar
Author(s): Scott Niekum
autogenerated on Thu Jun 6 2019 21:12:54