OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
line_average.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2020 by the OpenStructure authors
5 // Copyright (C) 2003-2010 by the IPLT authors
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License as published by the Free
9 // Software Foundation; either version 3.0 of the License, or (at your option)
10 // any later version.
11 // This library is distributed in the hope that it will be useful, but WITHOUT
12 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 // details.
15 //
16 // You should have received a copy of the GNU Lesser General Public License
17 // along with this library; if not, write to the Free Software Foundation, Inc.,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 //------------------------------------------------------------------------------
20 #ifndef IMG_ALG_LINE_AVERAGE_HH
21 #define IMG_ALG_LINE_AVERAGE_HH
22 
23 #include <ost/img/extent.hh>
24 #include <ost/img/image_state.hh>
26 #include <ost/dllexport.hh>
28 
29 namespace ost { namespace img { namespace alg {
30 
33 {
34  public:
35 
36  LineAverageBase(): geometry_(0) {};
37  LineAverageBase(unsigned int geometry): geometry_(geometry) {};
38 
39  // image state algorithm interface
40  template <typename T, class D>
41  img::ImageStateBasePtr VisitState(const ImageStateImpl<T,D>& s) const;
42 
43  static String GetAlgorithmName() {return "LineAverage";}
44 
45  void SetGeometry (unsigned int geometry) { geometry_ = geometry; }
46  unsigned int GetGeometry () { return geometry_; }
47 
48 private:
49 
50  int geometry_;
51 
52 };
53 
55 
56 }
57 OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModOPAlgorithm<alg::LineAverageBase>)
58 }} // ns
59 
60 #endif // IPLT_ALG_LINE_AVERAGE_HH
out-of-place modifying image state const visitor plus op algorithm
image_state::ImageStateConstModOPAlgorithm< alg::LineAverageBase > LineAverage
Definition: line_average.hh:54
std::string String
Definition: base.hh:54
#define DLLEXPORT_IMG_ALG
static String GetAlgorithmName()
Definition: line_average.hh:43
LineAverageBase(unsigned int geometry)
Definition: line_average.hh:37
void SetGeometry(unsigned int geometry)
Definition: line_average.hh:45
boost::shared_ptr< ImageStateBase > ImageStateBasePtr
computes mean value of columns or lines
Definition: line_average.hh:32
#define OST_IMG_ALG_EXPLICIT_INST_DECL(c, t)