22 #ifndef otbRadianceToImageImageFilter_h
23 #define otbRadianceToImageImageFilter_h
27 #include "itkNumericTraits.h"
46 template <
class TInput,
class TOutput>
80 outPixel =
static_cast<TOutput
>(temp);
107 template <
class TInputImage,
class TOutputImage>
110 TInputImage, TOutputImage,
111 typename Functor::RadianceToImageImageFunctor<typename TInputImage::InternalPixelType, typename TOutputImage::InternalPixelType>>
115 itkStaticConstMacro(InputImageDimension,
unsigned int, TInputImage::ImageDimension);
116 itkStaticConstMacro(OutputImageDimension,
unsigned int, TOutputImage::ImageDimension);
144 typedef typename itk::VariableLengthVector<double>
VectorType;
147 typedef typename InputImageType::SizeType
SizeType;
178 const auto & metadata = this->GetInput()->GetImageMetadata();
193 otbMsgDevMacro(<<
"this->GetInput()->GetNumberOfComponentsPerPixel() : " << this->GetInput()->GetNumberOfComponentsPerPixel());
195 if ((m_Alpha.GetSize() != this->GetInput()->GetNumberOfComponentsPerPixel()) || (m_Beta.GetSize() != this->GetInput()->GetNumberOfComponentsPerPixel()))
197 itkExceptionMacro(<<
"Alpha and Beta parameters should have the same size as the number of bands");
204 this->GetFunctorVector().clear();
205 for (
unsigned int i = 0; i < this->GetInput()->GetNumberOfComponentsPerPixel(); ++i)
210 this->GetFunctorVector().push_back(functor);
Subtract beta to the Input and multiply by alpha.
void SetBeta(double beta)
void SetAlpha(double alpha)
TOutput operator()(const TInput &inPixel) const
virtual ~RadianceToImageImageFunctor()
RadianceToImageImageFunctor()
Convert a radiance value into raw image value.
Functor::RadianceToImageImageFunctor< typename InputImageType::InternalPixelType, typename OutputImageType::InternalPixelType > FunctorType
~RadianceToImageImageFilter() override
void BeforeThreadedGenerateData(void) override
itk::SmartPointer< const Self > ConstPointer
InputImageType::RegionType InputImageRegionType
InputImageType::PixelType InputPixelType
TOutputImage OutputImageType
RadianceToImageImageFilter Self
OutputImageType::PixelType OutputPixelType
itk::SmartPointer< Self > Pointer
InputImageType::SizeType SizeType
InputImageType::InternalPixelType InputInternalPixelType
RadianceToImageImageFilter()
UnaryImageFunctorWithVectorImageFilter< InputImageType, OutputImageType, FunctorType > Superclass
itk::VariableLengthVector< double > VectorType
OutputImageType::InternalPixelType OutputInternalPixelType
TInputImage InputImageType
OutputImageType::RegionType OutputImageRegionType
Applies a functor to a VectorImage.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
#define otbMsgDevMacro(x)