iRoCS Toolbox  1.1.0
LaplacianFilter.hh
Go to the documentation of this file.
1 /**************************************************************************
2  *
3  * Copyright (C) 2015 Thorsten Falk
4  *
5  * Image Analysis Lab, University of Freiburg, Germany
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  *
21  **************************************************************************/
22 
23 /*======================================================================*/
29 /*======================================================================*/
30 
31 #ifndef ATBLAPLACIANFILTER_HH
32 #define ATBLAPLACIANFILTER_HH
33 
34 #ifdef HAVE_CONFIG_H
35 #include <config.hh>
36 #endif
37 
38 #include "Filter.hh"
39 
40 namespace atb
41 {
42 
43 /*======================================================================*/
49 /*======================================================================*/
50  template<typename DataT, int Dim>
52  public Filter< DataT,Dim,DataT >
53  {
54 
55  public:
56 
57  typedef DataT ResultT;
58 
60 
61 /*======================================================================*/
71 /*======================================================================*/
74  DataT const &boundaryValue = traits<DataT>::zero);
75 
76 /*======================================================================*/
85 /*======================================================================*/
88  DataT const &boundaryValue = traits<DataT>::zero);
89 
90 /*======================================================================*/
94 /*======================================================================*/
95  virtual ~LaplacianFilter();
96 
97 /*======================================================================*/
104 /*======================================================================*/
105  Accuracy accuracy() const;
106 
107 /*======================================================================*/
114 /*======================================================================*/
115  void setAccuracy(Accuracy accuracy);
116 
117 /*======================================================================*/
128 /*======================================================================*/
129  virtual void apply(
130  blitz::Array<DataT,Dim> const &data,
131  blitz::TinyVector<double,Dim> const &elementSizeUm,
132  blitz::Array<ResultT,Dim> &filtered,
133  iRoCS::ProgressReporter *pr = NULL) const;
134 
135  // Explicitly force the name mangler to also consider the base class
136  // implementation
138 
139 /*======================================================================*/
154 /*======================================================================*/
155  static void apply(
156  blitz::Array<DataT,Dim> const &data,
157  blitz::TinyVector<double,Dim> const &elementSizeUm,
158  blitz::Array<ResultT,Dim> &filtered,
159  Accuracy accuracy,
161  DataT const &boundaryValue = traits<DataT>::zero,
162  iRoCS::ProgressReporter *pr = NULL);
163 
164 /*======================================================================*/
181 /*======================================================================*/
182  static void apply(
183  Array<DataT,Dim> const &data, Array<ResultT,Dim> &filtered,
184  Accuracy accuracy,
186  DataT const &boundaryValue = traits<DataT>::zero,
187  iRoCS::ProgressReporter *pr = NULL);
188 
189  private:
190 
191  Accuracy _accuracy;
192 
193  };
194 
195 }
196 
197 #include "LaplacianFilter.icc"
198 
199 #endif
Base class (Interface) for all Filter implementations.
virtual ~LaplacianFilter()
Destructor.
The Filter class is the base class for all filter implementations.
Definition: Filter.hh:55
The Array class is an extension to the blitz++ Array class providing additional parameters element si...
Definition: Array.hh:85
BoundaryTreatmentType
BoundaryTreatment.hh "libArrayToolbox/BoundaryTreatment.hh".
The traits class provides means to query specific information about different data types...
Definition: TypeTraits.hh:73
The LaplacianFilter class implements the Filter interface and provides laplacian computation using fo...
LaplacianFilter(BoundaryTreatmentType bt=ValueBT, DataT const &boundaryValue=traits< DataT >::zero)
Default Constructor.
virtual void apply(blitz::Array< DataT, Dim > const &data, blitz::TinyVector< double, Dim > const &elementSizeUm, blitz::Array< ResultT, Dim > &filtered, iRoCS::ProgressReporter *pr=NULL) const
Apply the filter to the given Array.
Treat positions beyond the Array domain as having a constant value.
Accuracy accuracy() const
Get the order of accuracy of this filter.
void setAccuracy(Accuracy accuracy)
Set the order of accuracy of this filter.