Image Component Library (ICL)
|
00001 /******************************************************************** 00002 ** Image Component Library (ICL) ** 00003 ** ** 00004 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld ** 00005 ** Neuroinformatics Group ** 00006 ** Website: www.iclcv.org and ** 00007 ** http://opensource.cit-ec.de/projects/icl ** 00008 ** ** 00009 ** File : ICLIO/src/ICLIO/DCGrabber.h ** 00010 ** Module : ICLIO ** 00011 ** Authors: Christof Elbrechter, Michael Goetting, Viktor Richter ** 00012 ** ** 00013 ** ** 00014 ** GNU LESSER GENERAL PUBLIC LICENSE ** 00015 ** This file may be used under the terms of the GNU Lesser General ** 00016 ** Public License version 3.0 as published by the ** 00017 ** ** 00018 ** Free Software Foundation and appearing in the file LICENSE.LGPL ** 00019 ** included in the packaging of this file. Please review the ** 00020 ** following information to ensure the license requirements will ** 00021 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt ** 00022 ** ** 00023 ** The development of this software was supported by the ** 00024 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. ** 00025 ** The Excellence Cluster EXC 277 is a grant of the Deutsche ** 00026 ** Forschungsgemeinschaft (DFG) in the context of the German ** 00027 ** Excellence Initiative. ** 00028 ** ** 00029 ********************************************************************/ 00030 00031 #pragma once 00032 00033 00034 #include <ICLIO/DC.h> 00035 #include <ICLIO/DCDevice.h> 00036 #include <ICLIO/DCDeviceFeatures.h> 00037 #include <ICLIO/DCDeviceOptions.h> 00038 #include <ICLIO/Grabber.h> 00039 #include <ICLCore/Converter.h> 00040 00041 namespace icl{ 00042 namespace io{ 00044 namespace dc{ 00045 class DCGrabberThread; 00046 } 00050 00051 00087 class DCGrabber : public Grabber{ 00088 public: 00089 00091 00104 ICLIO_API DCGrabber(const DCDevice &dev=DCDevice::null, int isoMBits=0); 00105 00107 ICLIO_API ~DCGrabber(); 00108 00110 00111 ICLIO_API virtual const core::ImgBase *acquireImage(); 00112 00114 ICLIO_API static std::vector<DCDevice> getDCDeviceList(bool resetBusFirst=false); 00115 00117 static void dc1394_reset_bus(bool verbose=false){ 00118 DCDevice::dc1394_reset_bus(verbose); 00119 } 00120 00122 ICLIO_API virtual std::vector<std::string> get_io_property_list(); 00123 00124 private: 00126 00129 void restartGrabberThread(); 00131 void addProperties(); 00133 void processPropertyChange(const utils::Configurable::Property &p); 00134 00136 DCDevice m_oDev; 00137 00139 DCDeviceFeatures m_oDeviceFeatures; 00140 00142 dc::DCGrabberThread *m_poGT; 00143 00145 utils::Mutex m_GrabberThreadMutex; 00146 00148 core::ImgBase *m_poImage, *m_poImageTmp; 00149 00151 00153 core::Converter m_oConverter; 00154 00156 DCDeviceOptions m_oOptions; 00157 00159 std::string m_sUserDefinedBayerPattern; 00160 }; 00161 00162 } // namespace io 00163 } 00164