21 #ifndef __otbSimpleRcsPanSharpeningFusionImageFilter_h
22 #define __otbSimpleRcsPanSharpeningFusionImageFilter_h
51 template <
class TPanImageType,
class TXsImageType,
class TOutputImageType,
class TInternalPrecision =
float>
87 virtual void SetPanInput(
const TPanImageType * image);
88 const TPanImageType * GetPanInput(
void)
const;
90 virtual void SetXsInput(
const TXsImageType * path);
91 const TXsImageType * GetXsInput(
void)
const;
104 void PrintSelf(std::ostream& os,
itk::Indent indent)
const;
108 void operator =(
const Self&);
119 typename TOutputImageType::PixelType operator()(
const typename TXsImageType::PixelType& xsPixel,
120 const TInternalPrecision& smoothPanchroPixel,
121 const typename TPanImageType::PixelType& sharpPanchroPixel)
const
124 typename TOutputImageType::PixelType output(xsPixel.Size());
126 TInternalPrecision scale = 1.;
128 if(vcl_abs(smoothPanchroPixel) > 1e-10)
130 scale = sharpPanchroPixel/smoothPanchroPixel;
134 for(
unsigned int i = 0; i < xsPixel.Size(); ++i)
136 output[i] =
static_cast<typename TOutputImageType::InternalPixelType
>(
179 #ifndef OTB_MANUAL_INSTANTIATION