21 #ifndef otbGridResampleImageFilter_h
22 #define otbGridResampleImageFilter_h
25 #include "itkImageToImageFilter.h"
26 #include "itkLinearInterpolateImageFunction.h"
27 #include "itkDefaultConvertPixelTraits.h"
60 template <
typename TInputImage,
typename TOutputImage,
typename TInterpolatorPrecision =
double>
66 typedef itk::ImageToImageFilter<TInputImage, TOutputImage>
Superclass;
77 itkStaticConstMacro(ImageDimension,
unsigned int, TOutputImage::ImageDimension);
78 itkStaticConstMacro(InputImageDimension,
unsigned int, TInputImage::ImageDimension);
92 typedef itk::InterpolateImageFunction<InputImageType, TInterpolatorPrecision>
InterpolatorType;
109 itkSetMacro(OutputStartIndex,
IndexType);
110 itkGetConstReferenceMacro(OutputStartIndex,
IndexType);
113 itkGetConstReferenceMacro(OutputSize,
SizeType);
116 itkGetConstReferenceMacro(OutputOrigin,
PointType);
119 itkGetConstReferenceMacro(OutputSpacing,
SpacingType);
124 itkSetMacro(CheckOutputBounds,
bool);
125 itkGetMacro(CheckOutputBounds,
bool);
126 itkBooleanMacro(CheckOutputBounds);
128 itkSetMacro(InterpolationMargin,
double);
129 itkGetMacro(InterpolationMargin,
double);
135 void SetOutputParametersFromImage(
const ImageBaseType* image);
138 itk::ModifiedTimeType GetMTime(
void)
const override;
146 void GenerateOutputInformation()
override;
148 void GenerateInputRequestedRegion()
override;
150 void BeforeThreadedGenerateData()
override;
152 void ThreadedGenerateData(
const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId)
override;
154 void AfterThreadedGenerateData()
override;
162 itk::NumericTraits<OutputPixelType>::SetLength(outputValue, nComponents);
164 for (
unsigned int n = 0; n < nComponents; n++)
168 if (m_CheckOutputBounds && component < minComponent)
172 else if (m_CheckOutputBounds && component > maxComponent)
184 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
188 void operator=(
const Self&) =
delete;
214 #ifndef OTB_MANUAL_INSTANTIATION