Image Component Library (ICL)
Converter.h
Go to the documentation of this file.
1 /********************************************************************
2 ** Image Component Library (ICL) **
3 ** **
4 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld **
5 ** Neuroinformatics Group **
6 ** Website: www.iclcv.org and **
7 ** http://opensource.cit-ec.de/projects/icl **
8 ** **
9 ** File : ICLCore/src/ICLCore/Converter.h **
10 ** Module : ICLCore **
11 ** Authors: Christof Elbrechter **
12 ** **
13 ** **
14 ** GNU LESSER GENERAL PUBLIC LICENSE **
15 ** This file may be used under the terms of the GNU Lesser General **
16 ** Public License version 3.0 as published by the **
17 ** **
18 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
19 ** included in the packaging of this file. Please review the **
20 ** following information to ensure the license requirements will **
21 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
22 ** **
23 ** The development of this software was supported by the **
24 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
25 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
26 ** Forschungsgemeinschaft (DFG) in the context of the German **
27 ** Excellence Initiative. **
28 ** **
29 ********************************************************************/
30 
31 #pragma once
32 
33 #include <ICLUtils/CompatMacros.h>
34 #include <ICLCore/Img.h>
35 #include <ICLUtils/Uncopyable.h>
36 
37 
38 namespace icl{
39  namespace core{
41 
50  public:
52  enum oporder{
53  orderScaleConvertCC = 12,
54  orderScaleCCConvert = 21,
55  orderConvertScaleCC = 102,
56  orderConvertCCScale = 201,
57  orderCCScaleConvert = 120,
58  orderCCConvertScale = 210
59  };
60 
62 
65  Converter(bool applyToROIOnly=false);
66 
68 
72  Converter(oporder o, bool applyToROIOnly=false);
73 
75  Converter(const ImgBase *srcImage, ImgBase *dstImage, bool applyToROIOnly=false);
76 
78  ~Converter();
79 
81 
88 
92  void apply(const ImgBase *src, ImgBase *dst);
93 
95 
96  void setApplyToROIOnly(bool applyToROIOnly){ m_bROIOnly = applyToROIOnly; }
97 
98 
100 
117  void setOperationOrder(oporder o){ m_eOpOrder = o; }
118 
120  void setScaleMode(scalemode scaleMode);
121 
122  private:
124  void dynamicConvert(const ImgBase *src, ImgBase *dst);
125 
127 
138  void cc(const ImgBase *src, ImgBase *dst);
139 
142 
145 
148 
151 
154 
157 
159 
161 
164  };
165  } // namespace core
166 }
oporder m_eOpOrder
currently set operation order
Definition: Converter.h:160
undocument this line if you encounter any issues!
Definition: Any.h:37
Class interface for un-copyable classes.
Definition: Uncopyable.h:64
ImgBase * m_poROIBuffer
Buffer for ROI extraction.
Definition: Converter.h:150
scalemode m_scaleMode
internal scalemode
Definition: Converter.h:163
ICLCore_API void cc(const ImgBase *src, ImgBase *dst, bool roiOnly=false)
Color conversion from source to destination image.
bool m_bROIOnly
flag that indicates whether to work on source images ROI or on the whole sorce image
Definition: Converter.h:156
ImgBase * m_poCCBuffer
Buffer for emulated color conversin using Converter::cc(...)
Definition: Converter.h:144
scalemode
for scaling of Img images theses functions are provided
Definition: Types.h:84
oporder
enum to define internal used operation order
Definition: Converter.h:52
General Image Converter.
Definition: Converter.h:49
ImgBase * m_poColorBuffer
Buffer for color conversion.
Definition: Converter.h:153
ImgBase * m_poSizeBuffer
Buffer for size conversion.
Definition: Converter.h:141
void setOperationOrder(oporder o)
Sets up the operation order for this converter.
Definition: Converter.h:117
ImgBase is the Image-Interface class that provides save access to underlying Img-template .
Definition: ImgBase.h:131
void setApplyToROIOnly(bool applyToROIOnly)
sets up the converter to apply operations on the source images roi only
Definition: Converter.h:96
ImgBase * m_poDepthBuffer
Buffer for depth conversion.
Definition: Converter.h:147
#define ICLCore_API
Definition: CompatMacros.h:174