22 #ifndef __StreamingMosaicFilterBase_H
23 #define __StreamingMosaicFilterBase_H
25 #include "itkImageToImageFilter.h"
26 #include "itkNearestNeighborInterpolateImageFunction.h"
53 template <
class TInputImage,
class TOutputImage = TInputImage,
class TInternalValueType =
double>
59 typedef itk::ImageToImageFilter<TInputImage, TOutputImage>
Superclass;
91 typedef itk::InterpolateImageFunction<InputImageType, InternalValueType>
InterpolatorType;
138 itkSetMacro(AutomaticOutputParametersComputation,
bool);
139 itkGetMacro(AutomaticOutputParametersComputation,
bool);
143 itkSetMacro(ShiftScaleInputImages,
bool);
144 itkGetMacro(ShiftScaleInputImages,
bool);
145 itkBooleanMacro(ShiftScaleInputImages);
161 return m_ShiftMatrix;
166 return m_ScaleMatrix;
178 void GenerateOutputInformation(
void)
override;
180 void GenerateInputRequestedRegion(
void)
override;
182 void AfterThreadedGenerateData()
override;
184 void BeforeThreadedGenerateData()
override;
187 virtual void ImageToExtent(InputImageType* image, InputImagePointType& extentInf, InputImagePointType& extentSup);
190 virtual bool OutputRegionToInputRegion(
const OutputImageRegionType& mosaicRegion, InputImageRegionType& inputRegion, InputImageType*& inputImage);
193 virtual void NormalizePixelValue(InternalValueType& pixelValue);
196 virtual bool IsPixelNotEmpty(InputImagePixelType& inputPixel);
201 usedInputIndices.push_back(index);
206 return usedInputIndices[i];
211 return usedInputIndices.size();
215 virtual void ComputeOutputParameters();
220 return this->GetNumberOfInputs();
230 virtual void ComputeRequestedRegionOfInputImage(
unsigned int inputImageIndex);
235 value *= m_ScaleMatrix[imageIndex][band];
236 value += m_ShiftMatrix[imageIndex][band];
240 virtual void CheckShiftScaleMatrices();
243 virtual void PrepareImageAccessors(
typename std::vector<InputImageType*>& image,
typename std::vector<InterpolatorPointerType>& interpolator);
247 void operator=(
const Self&);
274 #ifndef OTB_MANUAL_INSTANTIATION