Image Component Library (ICL)
UnaryOpPipe.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 : ICLFilter/src/ICLFilter/UnaryOpPipe.h **
10 ** Module : ICLFilter **
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 <ICLFilter/UnaryOp.h>
35 #include <vector>
36 
37 namespace icl{
39  namespace core{ class ImgBase; }
42  namespace filter{
43 
44 
46 
94  public:
96  UnaryOpPipe();
97 
99  ~UnaryOpPipe();
100 
102  void add(UnaryOp *op, core::ImgBase*im=0);
103 
105 
107  add(op); return *this;
108  }
110  virtual void apply(const core::ImgBase *src, core::ImgBase **dst);
111 
113  virtual const core::ImgBase *apply(const core::ImgBase *src);
114 
116  int getLength() const;
117 
119  UnaryOp *&getOp(int i);
120 
122  core::ImgBase *&getImage(int i);
123 
125 
131  core::ImgBase *&getLastImage();
132 
133  private:
135  std::vector<UnaryOp*> ops;
136 
138  std::vector<core::ImgBase*> ims;
139  };
140  } // namespace filter
141 }
undocument this line if you encounter any issues!
Definition: Any.h:37
UnaryOpPipe & operator<<(UnaryOp *op)
stream based wrapper for the add function (calls add(op,0))
Definition: UnaryOpPipe.h:106
Utility class that helps applying UnaryOps one after another.
Definition: UnaryOpPipe.h:93
std::vector< UnaryOp * > ops
Internal buffer of ops.
Definition: UnaryOpPipe.h:135
std::vector< core::ImgBase * > ims
Internal buffer of result images.
Definition: UnaryOpPipe.h:138
Abstract Base class for Unary Operators.
Definition: UnaryOp.h:51
ICLQt_API core::Img< T > filter(const core::Img< T > &image, const std::string &filter)
applies a filter operation on the source image (affinity for float)
#define ICLFilter_API
Definition: CompatMacros.h:175
ImgBase is the Image-Interface class that provides save access to underlying Img-template .
Definition: ImgBase.h:131