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);
Add beta to the quotient Input over alpha.
virtual ~ImageToRadianceImageFunctor()
ImageToRadianceImageFunctor()
void SetBeta(double beta)
void SetAlpha(double alpha)
TOutput operator()(const TInput &inPixel) const
Convert a raw value into a radiance value.
OutputImageType::RegionType OutputImageRegionType
itk::VariableLengthVector< double > VectorType
UnaryImageFunctorWithVectorImageFilter< InputImageType, OutputImageType, FunctorType > Superclass
InputImageType::RegionType InputImageRegionType
~ImageToRadianceImageFilter() override
itk::SmartPointer< const Self > ConstPointer
InputImageType::SizeType SizeType
ImageToRadianceImageFilter()
TOutputImage OutputImageType
Functor::ImageToRadianceImageFunctor< typename InputImageType::InternalPixelType, typename OutputImageType::InternalPixelType > FunctorType
InputImageType::InternalPixelType InputInternalPixelType
void BeforeThreadedGenerateData(void) override
ImageToRadianceImageFilter Self
TInputImage InputImageType
OutputImageType::PixelType OutputPixelType
InputImageType::PixelType InputPixelType
itk::SmartPointer< Self > Pointer
OutputImageType::InternalPixelType OutputInternalPixelType
Applies a functor to a VectorImage.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
#define otbMsgDevMacro(x)