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 : ICLFilter/src/ICLFilter/ProximityOp.h ** 00010 ** Module : ICLFilter ** 00011 ** Authors: Christof Elbrechter, Andre Justus ** 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 #include <ICLFilter/BinaryOp.h> 00034 #include <ICLFilter/NeighborhoodOp.h> 00035 #include <ICLCore/Img.h> 00036 #include <ICLUtils/Uncopyable.h> 00037 #include <ICLUtils/Configurable.h> 00038 00039 namespace icl { 00040 namespace filter{ 00041 00043 00114 class ProximityOp : public BinaryOp, public utils::Uncopyable, public utils::Configurable{ 00115 public: 00116 00118 00119 enum applymode{ 00120 full, 00121 same, 00122 valid 00123 }; 00124 00126 00127 enum optype{ 00128 sqrDistance, 00129 crossCorr, 00130 crossCorrCoeff 00131 }; 00132 00134 00137 ICLFilter_API ProximityOp(optype ot, applymode am=valid); 00138 00140 virtual ~ProximityOp(){ 00141 if(m_poImageBuffer) delete m_poImageBuffer; 00142 if(m_poTemplateBuffer) delete m_poTemplateBuffer; 00143 } 00144 00146 00153 ICLFilter_API virtual void apply(const core::ImgBase *poSrc1, const core::ImgBase *poSrc2, core::ImgBase **ppoDst); 00154 00156 using BinaryOp::apply; 00157 00159 00160 ICLFilter_API void setOpType(optype ot); 00161 00163 00164 ICLFilter_API void setApplyMode(applymode am); 00165 00167 00168 ICLFilter_API optype getOpType() const; 00169 00171 00172 ICLFilter_API applymode getApplyMode() const; 00173 00174 private: 00175 00177 core::Img32f *m_poImageBuffer; 00178 00180 core::Img32f *m_poTemplateBuffer; 00181 }; 00182 } // namespace filter 00183 } // namespace icl