22 #ifndef otbImageToRadianceImageFilter_h
23 #define otbImageToRadianceImageFilter_h
26 #include "itkNumericTraits.h"
45 template <
class TInput,
class TOutput>
79 outPixel =
static_cast<TOutput
>(temp);
106 template <
class TInputImage,
class TOutputImage>
109 TInputImage, TOutputImage,
110 typename Functor::ImageToRadianceImageFunctor<typename TInputImage::InternalPixelType, typename TOutputImage::InternalPixelType>>
114 itkStaticConstMacro(InputImageDimension,
unsigned int, TInputImage::ImageDimension);
115 itkStaticConstMacro(OutputImageDimension,
unsigned int, TOutputImage::ImageDimension);
143 typedef typename itk::VariableLengthVector<double>
VectorType;
146 typedef typename InputImageType::SizeType
SizeType;
177 const auto & metadata = this->GetInput()->GetImageMetadata();
192 otbMsgDevMacro(<<
"this->GetInput()->GetNumberOfComponentsPerPixel() : " << this->GetInput()->GetNumberOfComponentsPerPixel());
194 if ((m_Alpha.GetSize() != this->GetInput()->GetNumberOfComponentsPerPixel()) || (m_Beta.GetSize() != this->GetInput()->GetNumberOfComponentsPerPixel()))
196 itkExceptionMacro(<<
"Alpha and Beta parameters should have the same size as the number of bands");
203 this->GetFunctorVector().clear();
204 for (
unsigned int i = 0; i < this->GetInput()->GetNumberOfComponentsPerPixel(); ++i)
209 this->GetFunctorVector().push_back(functor);