iRoCS Toolbox  1.1.0
SeparableFilter.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 /*======================================================================*/
28 /*======================================================================*/
29 
30 #ifndef ATBSEPARABLEFILTER_HH
31 #define ATBSEPARABLEFILTER_HH
32 
33 #ifdef HAVE_CONFIG_H
34 #include <config.hh>
35 #endif
36 
37 #include "Filter.hh"
38 
39 namespace atb
40 {
41 
42 /*======================================================================*/
51 /*======================================================================*/
52  template<typename DataT, int Dim, typename ResultT>
53  class SeparableFilter : public Filter<DataT,Dim,ResultT>
54  {
55 
56  public:
57 
58 /*======================================================================*/
68 /*======================================================================*/
71  DataT const &boundaryValue = traits<DataT>::zero);
72 
73 /*======================================================================*/
77 /*======================================================================*/
78  virtual ~SeparableFilter();
79 
80 /*======================================================================*/
92 /*======================================================================*/
93  virtual void applyAlongDim(
94  blitz::Array<DataT,Dim> const &data,
95  blitz::TinyVector<double,Dim> const &elementSizeUm,
96  blitz::Array<ResultT,Dim> &result, int dim,
97  iRoCS::ProgressReporter *pr = NULL) const = 0;
98 
99 /*======================================================================*/
110 /*======================================================================*/
111  virtual void applyAlongDim(
112  Array<DataT,Dim> const &data,
113  Array<ResultT,Dim> &result, int dim,
114  iRoCS::ProgressReporter *pr = NULL) const;
115 
116  };
117 
118 }
119 
120 #include "SeparableFilter.icc"
121 
122 #endif
Base class (Interface) for all Filter implementations.
virtual void applyAlongDim(blitz::Array< DataT, Dim > const &data, blitz::TinyVector< double, Dim > const &elementSizeUm, blitz::Array< ResultT, Dim > &result, int dim, iRoCS::ProgressReporter *pr=NULL) const =0
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
Treat positions beyond the Array domain as having a constant value.
virtual ~SeparableFilter()
Destructor.
SeparableFilter(BoundaryTreatmentType btType=ValueBT, DataT const &boundaryValue=traits< DataT >::zero)
Constructor.