31 #ifndef __Convolution_hh__
32 #define __Convolution_hh__
36 #include "FilterNToN.hh"
37 #include "FilterMask.hh"
39 #define D_GRADGAUSS_KERNEL 0x00000001
40 #define D_CONV_KERNEL 0x00000002
41 #define D_GRAD_DEB 0x00000004
42 #define D_WRITE_IMAGES 0x00000008
43 #define D_CONV_TYPES 0x00000010
44 #define D_HESSGAUSS_KERNEL 0x00000012
47 #define CONV_FLOAT float
65 template <
class InputStorageType,
class OutputStorageType>
67 :
public FilterNToN<InputStorageType, OutputStorageType>
100 void PrintKernel()
const;
104 {
return ((
typeid(OutputStorageType)==
typeid(
float)) ||
105 (
typeid(OutputStorageType)==
typeid(
double))||
106 (
typeid(InputStorageType)==
typeid(
float)) ||
107 (
typeid(InputStorageType)==
typeid(
double))); };
144 { _fm.GetSize(border_x, border_y); }
151 #endif // __Convolution_hh__
virtual FilterNToN< InputStorageType, OutputStorageType > * Clone() const
generic convolution class.
Image< CONV_FLOAT > _tmpFloat
temporary memory, needed for separable filters when float filtering
Image< CONV_INT > _tmpInt
temporary memory, needed for separable filters when integer filtering
void SetKernel(FilterMask &fm)
set a new filter mask
base class for simple n->n filter implementations
void GetKernel(FilterMask &fm) const
get the current filter mask
void GetBordersValid_(int &border_x, int &border_y) const
A filter mask (or a kernel) used for convolution.
bool CalculationInFloat() const
decides if calculation is done in integer or floating point