21 #ifndef otbOverlapSaveConvolutionImageFilter_h
22 #define otbOverlapSaveConvolutionImageFilter_h
24 #include "itkImageToImageFilter.h"
26 #include "itkNumericTraits.h"
28 #include "itkZeroFluxNeumannBoundaryCondition.h"
61 template <
class TInputImage,
class TOutputImage,
class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
66 itkStaticConstMacro(InputImageDimension,
unsigned int, TInputImage::ImageDimension);
67 itkStaticConstMacro(OutputImageDimension,
unsigned int, TOutputImage::ImageDimension);
76 typedef itk::ImageToImageFilter<InputImageType, OutputImageType>
Superclass;
89 typedef typename itk::NumericTraits<InputPixelType>::RealType
InputRealType;
93 typedef typename itk::Array<InputRealType>
ArrayType;
99 itkDebugMacro(
"setting radius to " << rad);
100 if (this->m_Radius != rad)
102 this->m_Radius = rad;
103 unsigned int arraySize = 1;
104 for (
unsigned int i = 0; i < m_Radius.GetSizeDimension(); ++i)
106 arraySize *= 2 * this->m_Radius[i] + 1;
108 this->m_Filter.SetSize(arraySize);
109 this->m_Filter.Fill(1);
116 itkGetConstReferenceMacro(Radius, InputSizeType);
121 if ((filter.Size() != m_Filter.Size()))
123 itkExceptionMacro(
"Error in SetFilter, invalid filter size:" << filter.Size() <<
" instead of 2*(m_Radius[0]+1)*(2*m_Radius[1]+1): " << m_Filter.Size());
133 itkGetConstReferenceMacro(
Filter, ArrayType);
136 itkSetMacro(NormalizeFilter,
bool);
137 itkGetMacro(NormalizeFilter,
bool);
138 itkBooleanMacro(NormalizeFilter);
144 void GenerateInputRequestedRegion()
override;
146 #ifdef ITK_USE_CONCEPT_CHECKING
148 itkConceptMacro(InputHasNumericTraitsCheck, (itk::Concept::HasNumericTraits<InputPixelType>));
161 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
166 void GenerateData()
override;
171 void operator=(
const Self&) =
delete;
184 #ifndef OTB_MANUAL_INSTANTIATION