OpenStructure
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>
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 }
58 }} // ns
59 
60 #endif // IPLT_ALG_LINE_AVERAGE_HH
computes mean value of columns or lines
Definition: line_average.hh:33
img::ImageStateBasePtr VisitState(const ImageStateImpl< T, D > &s) const
LineAverageBase(unsigned int geometry)
Definition: line_average.hh:37
static String GetAlgorithmName()
Definition: line_average.hh:43
void SetGeometry(unsigned int geometry)
Definition: line_average.hh:45
out-of-place modifying image state const visitor plus op algorithm
#define DLLEXPORT_IMG_ALG
#define OST_IMG_ALG_EXPLICIT_INST_DECL(c, t)
std::string String
Definition: base.hh:54
image_state::ImageStateConstModOPAlgorithm< alg::LineAverageBase > LineAverage
Definition: line_average.hh:54
boost::shared_ptr< ImageStateBase > ImageStateBasePtr
Definition: base.dox:1