21 #ifndef otbFastICAImageFilter_h
22 #define otbFastICAImageFilter_h
24 #include "itkImageToImageFilter.h"
46 template <
class TInputImage,
class TOutputImage, Transform::TransformDirection TDirectionOfTransformation>
52 typedef itk::ImageToImageFilter<TInputImage, TOutputImage>
Superclass;
63 itkStaticConstMacro(InputImageDimension,
unsigned int, TInputImage::ImageDimension);
64 itkStaticConstMacro(OutputImageDimension,
unsigned int, TOutputImage::ImageDimension);
97 itkGetMacro(NumberOfPrincipalComponentsRequired,
unsigned int);
98 itkSetMacro(NumberOfPrincipalComponentsRequired,
unsigned int);
109 return this->GetPCAFilter()->GetMeanValues();
113 m_PCAFilter->SetMeanValues(vec);
118 return this->GetPCAFilter()->GetStdDevValues();
122 m_PCAFilter->SetStdDevValues(vec);
127 return this->GetPCAFilter()->GetTransformationMatrix();
131 m_PCAFilter->SetTransformationMatrix(mat, isForward);
138 m_IsTransformationForward = isForward;
139 m_GivenTransformationMatrix =
true;
140 m_TransformationMatrix = mat;
144 itkGetMacro(NumberOfIterations,
unsigned int);
145 itkSetMacro(NumberOfIterations,
unsigned int);
147 itkGetMacro(ConvergenceThreshold,
double);
148 itkSetMacro(ConvergenceThreshold,
double);
152 m_NonLinearity = NonLinearity;
153 m_NonLinearityDerivative = NonLinearityDerivative;
160 itkGetMacro(Mu,
double);
161 itkSetMacro(Mu,
double);
177 void GenerateOutputInformation()
override;
182 void GenerateData()
override;
185 void ForwardGenerateOutputInformation();
186 void ReverseGenerateOutputInformation();
187 virtual void ForwardGenerateData();
188 virtual void ReverseGenerateData();
192 virtual void GenerateTransformationMatrix();
219 #ifndef OTB_MANUAL_INSTANTIATION
Performs a Independent Component Analysis (ICA)
void SetNonLinearity(NonLinearityType NonLinearity, NonLinearityType NonLinearityDerivative)
InternalMatrixType::element_type MatrixElementType
itk::SmartPointer< const Self > ConstPointer
PCAFilterType::MatrixType MatrixType
NonLinearityType m_NonLinearity
std::function< double(double)> NonLinearityType
PCAFilterPointerType m_PCAFilter
MatrixType GetPCATransformationMatrix() const
PCAFilterType::VectorType VectorType
FastICAImageFilter(const Self &)=delete
TInputImage InputImageType
TOutputImage OutputImageType
MeanEstimatorFilterType::Pointer MeanEstimatorFilterPointerType
StreamingStatisticsVectorImageFilter< InputImageType > MeanEstimatorFilterType
PCAFilterType::RealType RealType
~FastICAImageFilter() override
PCAImageFilter< InputImageType, OutputImageType, TDirectionOfTransformation > PCAFilterType
unsigned int m_NumberOfPrincipalComponentsRequired
bool m_IsTransformationForward
MatrixImageFilter< TInputImage, TOutputImage > TransformFilterType
MatrixType m_TransformationMatrix
void SetMeanValues(const VectorType &vec)
TransformFilterPointerType m_TransformFilter
TransformFilterType::Pointer TransformFilterPointerType
void SetStdDevValues(const VectorType &vec)
bool m_GivenTransformationMatrix
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
void operator=(const Self &)=delete
itk::SmartPointer< Self > Pointer
FastICAInternalOptimizerVectorImageFilter< InputImageType, InputImageType > InternalOptimizerType
double m_ConvergenceThreshold
PCAFilterType::Pointer PCAFilterPointerType
MatrixType::InternalMatrixType InternalMatrixType
VectorType GetMeanValues() const
VectorType GetStdDevValues() const
void SetPCATransformationMatrix(const MatrixType &mat, bool isForward=true)
NonLinearityType m_NonLinearityDerivative
void SetTransformationMatrix(const MatrixType &mat, bool isForward=true)
unsigned int m_NumberOfIterations
InternalOptimizerType::Pointer InternalOptimizerPointerType
Transform::TransformDirection TransformDirectionEnumType
Internal optimisation of the FastICA unmixing filter.
itk::SmartPointer< Self > Pointer
Apply a matrix multiplication over the channels of an image.
itk::SmartPointer< Self > Pointer
Performs a Principal Component Analysis.
MatrixObjectType::ComponentType MatrixType
CovarianceEstimatorFilterType::RealPixelType VectorType
CovarianceEstimatorFilterType::RealType RealType
itk::SmartPointer< Self > Pointer
This class streams the whole input image through the PersistentStatisticsImageFilter.
itk::SmartPointer< Self > Pointer
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.