OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
gaussian_laplacian.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 
21 /*
22  Authors: Giani Signorell, Ansgar Philippsen, Valerio Mariani
23 */
24 
25 #ifndef IMG_ALG_FILTER_GAUSSIAN_LAPLACIAN_H
26 #define IMG_ALG_FILTER_GAUSSIAN_LAPLACIAN_H
27 
28 #include <ost/img/algorithm.hh>
29 #include <ost/img/image_state.hh>
31 #include <ost/message.hh>
32 
33 #include "line_iterator.hh"
34 
35 namespace ost { namespace img { namespace alg {
36 
38 
46 {
47 public:
50 
51  template <typename T, class D>
52  void VisitState(ImageStateImpl<T,D>& s);
53 
54  static String GetAlgorithmName() {return "GaussianLaplacianFilter";}
55 
57  void SetSigma(Real sigma) {
58  calcBVals( calcQ(sigma) );
59  }
61  void SetQ(Real q) {
62  calcBVals( q );
63  }
64 
65 protected:
66  Real b0_, b1_, b2_, b3_, bb_;
67 
68 private:
69  Real calcQ( Real sigma );
70  void calcBVals( Real q );
71 
72  template <typename T, class D>
73  void lineTransformFW(ImageStateImpl<T,D>& s, ExtentIterator& it);
74 
75  template <typename T, class D>
76  void lineTransformBW(ImageStateImpl<T,D>& s, ExtentIterator& it);
77 };
78 
79 typedef ImageStateModIPAlgorithm<GaussianLaplacianFilterBase> GaussianLaplacianFilter;
80 
81 }
82 
83 OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateModIPAlgorithm<alg::GaussianLaplacianFilterBase>)
84 
85 }} // namespaces
86 
87 #endif
void SetSigma(Real sigma)
Set smoothing radius.
std::string String
Definition: base.hh:54
float Real
Definition: base.hh:44
#define DLLEXPORT_IMG_ALG
ImageStateModIPAlgorithm< GaussianLaplacianFilterBase > GaussianLaplacianFilter
void SetQ(Real q)
Set q value directly.
#define OST_IMG_ALG_EXPLICIT_INST_DECL(c, t)