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);
274 #ifndef OTB_MANUAL_INSTANTIATION
Base class for mosaic filters. Computes the total extent of multiple inputs, and provide routines to ...
InputImageType::IndexType InputImageIndexType
itk::ImageRegionConstIterator< OutputImageType > ConstIteratorType
virtual unsigned int GetNumberOfBands()
otb::StreamingTraits< OutputImageType > StreamingTraitsType
virtual void SetScaleMatrix(MatrixType scaleMatrix)
OutputImageSpacingType m_OutputSpacing
StreamingMosaicFilterBase Self
InterpolatorType::Pointer InterpolatorPointerType
InputImageType::RegionType InputImageRegionType
bool m_ShiftScaleInputImages
virtual void AddUsedInputImageIndex(unsigned int index)
virtual unsigned int GetUsedInputImageIndice(unsigned int i)
OutputImageType::IndexType OutputImageIndexType
InputImageType::SizeType InputImageSizeType
~StreamingMosaicFilterBase()
itk::SmartPointer< const Self > ConstPointer
OutputImagePixelType m_NoDataOutputPixel
itk::ImageRegionIterator< OutputImageType > IteratorType
OutputImageType::Pointer OutputImagePointer
unsigned int interpolatorRadius
InputImageType::PointType InputImagePointType
InterpolatorPointerType m_Interpolator
InternalValueType minOutputPixelValue
OutputImageType::RegionType OutputImageRegionType
InputImagePixelType m_NoDataInputPixel
StreamingMosaicFilterBase(const Self &)
OutputImageType::PixelType OutputImagePixelType
vnl_matrix< InternalValueType > MatrixType
itk::ContinuousIndex< double, 2 > ContinuousIndexType
itk::NearestNeighborInterpolateImageFunction< InputImageType, InternalValueType > DefaultInterpolatorType
virtual void ShiftScaleValue(InternalValueType &value, const unsigned int &imageIndex, unsigned int &band)
virtual unsigned int GetNumberOfUsedInputImages()
void operator=(const Self &)
std::vector< unsigned int > IndicesListType
OutputImageType::PointType OutputImagePointType
itk::SmartPointer< Self > Pointer
OutputImageType::InternalPixelType OutputImageInternalPixelType
InputImageType::ConstPointer InputImagePointer
TOutputImage OutputImageType
TInternalValueType InternalValueType
IndicesListType usedInputIndices
itkGetObjectMacro(Interpolator, InterpolatorType)
virtual void SetShiftMatrix(MatrixType shiftMatrix)
InternalValueType maxOutputPixelValue
InputImageType::InternalPixelType InputImageInternalPixelType
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
itk::InterpolateImageFunction< InputImageType, InternalValueType > InterpolatorType
OutputImageType::SizeType OutputImageSizeType
virtual MatrixType GetScaleMatrix()
virtual MatrixType GetShiftMatrix()
bool m_AutomaticOutputParametersComputation
OutputImageType::SpacingType OutputImageSpacingType
OutputImagePointType m_OutputOrigin
InternalImageType::PixelType InternalPixelType
InputImageType::PixelType InputImagePixelType
otb::VectorImage< InternalValueType, 2 > InternalImageType
OutputImageSizeType m_OutputSize
TInputImage InputImageType
InputImageType::SpacingType InputImageSpacingType
virtual unsigned int GetNumberOfInputImages()
This class provides internal information for streamable filters.
Creation of an "otb" vector image which contains metadata.
Superclass::PixelType PixelType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.