22 #ifndef otbVectorRescaleIntensityImageFilter_h
23 #define otbVectorRescaleIntensityImageFilter_h
25 #include "itkUnaryFunctorImageFilter.h"
26 #include "itkVariableLengthVector.h"
43 template <
typename TInput,
typename TOutput>
48 typedef typename itk::NumericTraits<typename TInput::ValueType>::RealType
RealType;
148 return !(*
this != other);
156 result.SetSize(x.GetSize());
162 itkGenericExceptionMacro(<<
"Pixel size different from scale or shift size !");
166 for (
unsigned int i = 0; i < x.GetSize(); ++i)
183 scaledComponent = std::pow(scaledComponent, 1. /
m_Gamma);
185 result[i] =
static_cast<typename TOutput::ValueType
>(scaledComponent +
m_OutputMinimum[i]);
219 template <
class TInputImage,
class TOutputImage = TInputImage>
221 :
public itk::UnaryFunctorImageFilter<TInputImage, TOutputImage,
222 Functor::VectorAffineTransform<typename TInputImage::PixelType, typename TOutputImage::PixelType>>
227 typedef itk::UnaryFunctorImageFilter<TInputImage, TOutputImage,
239 typedef typename itk::NumericTraits<InputValueType>::RealType
InputRealType;
249 itkSetMacro(AutomaticInputMinMaxComputation,
bool);
250 itkGetMacro(AutomaticInputMinMaxComputation,
bool);
251 itkBooleanMacro(AutomaticInputMinMaxComputation);
253 itkGetMacro(ClampThreshold,
double);
254 itkSetMacro(ClampThreshold,
double);
262 itkSetMacro(Gamma,
double);
263 itkGetConstReferenceMacro(Gamma,
double);
266 void BeforeThreadedGenerateData(
void)
override;
269 void GenerateOutputInformation(
void)
override;
272 void GenerateInputRequestedRegion(
void)
override;
275 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
285 void operator=(
const Self&) =
delete;
298 #ifndef OTB_MANUAL_INSTANTIATION