iRoCS Toolbox  1.1.0
CentralHessianFilter.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 ATBCENTRALHESSIANFILTER_HH
32 #define ATBCENTRALHESSIANFILTER_HH
33 
34 #ifdef HAVE_CONFIG_H
35 #include <config.hh>
36 #endif
37 
38 #include "CentralGradientFilter.hh"
39 
40 namespace atb
41 {
42 
43 /*======================================================================*/
49 /*======================================================================*/
50  template<typename DataT, int Dim>
52  public SeparableFilter< DataT,Dim,blitz::TinyMatrix<DataT,Dim,Dim> >
53  {
54 
55  public:
56 
57  typedef blitz::TinyMatrix<DataT,Dim,Dim> ResultT;
58 
59 /*======================================================================*/
68 /*======================================================================*/
71  DataT const &boundaryValue = traits<DataT>::zero);
72 
73 /*======================================================================*/
82 /*======================================================================*/
86  DataT const &boundaryValue = traits<DataT>::zero);
87 
88 /*======================================================================*/
92 /*======================================================================*/
93  virtual ~CentralHessianFilter();
94 
95 /*======================================================================*/
102 /*======================================================================*/
104 
105 /*======================================================================*/
112 /*======================================================================*/
113  void setAccuracy(
115 
116 /*======================================================================*/
127 /*======================================================================*/
128  virtual void applyAlongDim(
129  blitz::Array<DataT,Dim> const &data,
130  blitz::TinyVector<double,Dim> const &elementSizeUm,
131  blitz::Array<DataT,Dim> &filtered, int dim,
132  iRoCS::ProgressReporter *pr = NULL) const;
133 
134 /*======================================================================*/
145 /*======================================================================*/
146  virtual void applyAlongDim(
147  blitz::Array<DataT,Dim> const &data,
148  blitz::TinyVector<double,Dim> const &elementSizeUm,
149  blitz::Array<ResultT,Dim> &filtered, int dim,
150  iRoCS::ProgressReporter *pr = NULL) const;
151 
152  // Explicitly force the name mangler to also consider the base class
153  // implementation
155 
156 /*======================================================================*/
167 /*======================================================================*/
168  virtual void apply(
169  blitz::Array<DataT,Dim> const &data,
170  blitz::TinyVector<double,Dim> const &elementSizeUm,
171  blitz::Array<ResultT,Dim> &filtered,
172  iRoCS::ProgressReporter *pr = NULL) const;
173 
174  // Explicitly force the name mangler to also consider the base class
175  // implementation
177 
178 /*======================================================================*/
193 /*======================================================================*/
194  static void apply(
195  blitz::Array<DataT,Dim> const &data,
196  blitz::TinyVector<double,Dim> const &elementSizeUm,
197  blitz::Array<ResultT,Dim> &filtered,
200  DataT const &boundaryValue = traits<DataT>::zero,
201  iRoCS::ProgressReporter *pr = NULL);
202 
203 /*======================================================================*/
220 /*======================================================================*/
221  static void apply(
222  Array<DataT,Dim> const &data, Array<ResultT,Dim> &filtered,
225  DataT const &boundaryValue = traits<DataT>::zero,
226  iRoCS::ProgressReporter *pr = NULL);
227 
228  private:
229 
231 
232  };
233 
234 }
235 
236 #include "CentralHessianFilter.icc"
237 
238 #endif
The Implementation of the filter computing the gradient of the input data using central differences...
virtual void applyAlongDim(blitz::Array< DataT, Dim > const &data, blitz::TinyVector< double, Dim > const &elementSizeUm, blitz::Array< DataT, Dim > &filtered, int dim, iRoCS::ProgressReporter *pr=NULL) const
Apply the filter along the specified dimension.
The Filter class is the base class for all filter implementations.
Definition: Filter.hh:55
The SeparableFilter class specifies methods a separable filter provides additionally to the filter me...
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
void setAccuracy(typename CentralGradientFilter< DataT, Dim >::Accuracy accuracy)
Set the order of accuracy of this filter.
CentralHessianFilter(BoundaryTreatmentType bt=ValueBT, DataT const &boundaryValue=traits< DataT >::zero)
Default Constructor.
The CentralHessianFilter class implements the SeparableFilter interface and provides hessian computat...
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.
CentralGradientFilter< DataT, Dim >::Accuracy accuracy() const
Get the order of accuracy of this filter.
blitz::TinyMatrix< DataT, Dim, Dim > ResultT
Treat positions beyond the Array domain as having a constant value.
virtual ~CentralHessianFilter()
Destructor.