VTK  9.7.1
vtkHighestDensityRegionsStatistics.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
30 #ifndef vtkHighestDensityRegionsStatistics_h
31 #define vtkHighestDensityRegionsStatistics_h
32 
33 #include "vtkFiltersStatisticsModule.h" // For export macro
34 #include "vtkStatisticsAlgorithm.h"
35 
36 VTK_ABI_NAMESPACE_BEGIN
38 class vtkVariant;
39 
40 class VTKFILTERSSTATISTICS_EXPORT vtkHighestDensityRegionsStatistics : public vtkStatisticsAlgorithm
41 {
42 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
48  int GetMaximumNumberOfColumnsPerRequest() const override { return 2; }
49 
53  bool Aggregate(vtkDataObjectCollection*, vtkStatisticalModel*) override { return false; }
54 
56  void AppendAlgorithmParameters(std::string& algorithmParameters) const override;
57 
60  vtkStringToken parameterName, const std::string& algorithmParameters) override;
61 
65  void SetSigma(double sigma);
66 
70  void SetSigmaMatrix(double s11, double s12, double s21, double s22);
71 
79  double ComputeHDR(vtkDataArray* inObservations, vtkDataArray* outDensity);
80 
88  double ComputeHDR(vtkDataArray* inObs, vtkDataArray* inPOI, vtkDataArray* outDensity);
89 
90 protected:
93 
97  void Learn(vtkTable*, vtkTable*, vtkStatisticalModel*) override;
98 
102  void Derive(vtkStatisticalModel*) override;
103 
108 
112  void Test(vtkTable*, vtkStatisticalModel*, vtkTable*) override {}
113 
118 
120 
124  double SmoothHC1[2];
125  double SmoothHC2[2];
126  double InvSigmaC1[2];
127  double InvSigmaC2[2];
128  double Determinant;
130 
135 
136 private:
143  double ComputeSmoothGaussianKernel(int dimension, double khx, double khy);
144 
146  void operator=(const vtkHighestDensityRegionsStatistics&) = delete;
147 };
148 
149 VTK_ABI_NAMESPACE_END
150 #endif
A base class for a functor that assesses data.
double Determinant
Store the smooth matrix parameter H.
vtkIdType NumberOfRequestedColumnsPair
Store the number of requested columns pair computed by learn method.
a base class for statistical modeling of other data
virtual std::size_t ConsumeNextAlgorithmParameter(vtkStringToken parameterName, const std::string &algorithmParameters)
Consume a single parameter value, setting the value on this instance of the class.
static vtkTableAlgorithm * New()
maintain an unordered list of data objects
virtual void AppendAlgorithmParameters(std::string &algorithmParameters) const
Subclasses must override this method if they have any internal ivars that affect the behavior of Requ...
a vtkAbstractArray subclass for strings
int vtkIdType
Definition: vtkType.h:363
A type representing the union of many types.
Definition: vtkVariant.h:52
virtual void Learn(vtkTable *, vtkTable *, vtkStatisticalModel *)=0
Execute the calculations required by the Learn option, given some input Data.
int GetMaximumNumberOfColumnsPerRequest() const override
This filter requires bivariate requests.
Base class for statistics algorithms.
a simple class to control print indentation
Definition: vtkIndent.h:28
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
bool Aggregate(vtkDataObjectCollection *, vtkStatisticalModel *) override
Given a collection of models, calculate aggregate model.
void Assess(vtkTable *, vtkStatisticalModel *, vtkTable *) override
Execute the calculations required by the Assess option.
virtual void Derive(vtkStatisticalModel *)=0
Execute the calculations required by the Derive option.
Represent a string by its integer hash.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:59
void SelectAssessFunctor(vtkTable *, vtkDataObject *, vtkStringArray *, AssessFunctor *&) override
Provide the appropriate assessment functor.
Compute a random vector of density f from input observations points.
general representation of visualization data
Definition: vtkDataObject.h:55
void Test(vtkTable *, vtkStatisticalModel *, vtkTable *) override
Execute the calculations required by the Test option.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.