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 : ICLCore/src/ICLCore/Converter.h ** 00010 ** Module : ICLCore ** 00011 ** Authors: Christof Elbrechter ** 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 <ICLUtils/CompatMacros.h> 00034 #include <ICLCore/Img.h> 00035 #include <ICLUtils/Uncopyable.h> 00036 00037 00038 namespace icl{ 00039 namespace core{ 00041 00049 class ICLCore_API Converter : public utils::Uncopyable{ 00050 public: 00052 enum oporder{ 00053 orderScaleConvertCC = 12, 00054 orderScaleCCConvert = 21, 00055 orderConvertScaleCC = 102, 00056 orderConvertCCScale = 201, 00057 orderCCScaleConvert = 120, 00058 orderCCConvertScale = 210 00059 }; 00060 00062 00065 Converter(bool applyToROIOnly=false); 00066 00068 00072 Converter(oporder o, bool applyToROIOnly=false); 00073 00075 Converter(const ImgBase *srcImage, ImgBase *dstImage, bool applyToROIOnly=false); 00076 00078 ~Converter(); 00079 00081 00088 00089 00092 void apply(const ImgBase *src, ImgBase *dst); 00093 00095 00096 void setApplyToROIOnly(bool applyToROIOnly){ m_bROIOnly = applyToROIOnly; } 00097 00098 00100 00117 void setOperationOrder(oporder o){ m_eOpOrder = o; } 00118 00120 void setScaleMode(scalemode scaleMode); 00121 00122 private: 00124 void dynamicConvert(const ImgBase *src, ImgBase *dst); 00125 00127 00138 void cc(const ImgBase *src, ImgBase *dst); 00139 00141 ImgBase *m_poSizeBuffer; 00142 00144 ImgBase *m_poCCBuffer; 00145 00147 ImgBase *m_poDepthBuffer; 00148 00150 ImgBase *m_poROIBuffer; 00151 00153 ImgBase *m_poColorBuffer; 00154 00156 bool m_bROIOnly; 00157 00159 00160 oporder m_eOpOrder; 00161 00163 scalemode m_scaleMode; 00164 }; 00165 } // namespace core 00166 }