VTK  9.5.20251221
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
29
30#ifndef vtkHighestDensityRegionsStatistics_h
31#define vtkHighestDensityRegionsStatistics_h
32
33#include "vtkFiltersStatisticsModule.h" // For export macro
35
36VTK_ABI_NAMESPACE_BEGIN
38class vtkVariant;
39
40class VTKFILTERSSTATISTICS_EXPORT vtkHighestDensityRegionsStatistics : public vtkStatisticsAlgorithm
41{
42public:
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
90protected:
93
98
103
108
113
118
120
124 double SmoothHC1[2];
125 double SmoothHC2[2];
126 double InvSigmaC1[2];
127 double InvSigmaC2[2];
130
135
136private:
143 double ComputeSmoothGaussianKernel(int dimension, double khx, double khy);
144
146 void operator=(const vtkHighestDensityRegionsStatistics&) = delete;
147};
148
149VTK_ABI_NAMESPACE_END
150#endif
maintain an unordered list of data objects
general representation of visualization data
double InvSigmaC1[2]
Store the smooth matrix parameter H.
vtkIdType NumberOfRequestedColumnsPair
Store the number of requested columns pair computed by learn method.
void Test(vtkTable *, vtkStatisticalModel *, vtkTable *) override
Execute the calculations required by the Test option.
void Learn(vtkTable *, vtkTable *, vtkStatisticalModel *) override
Execute the calculations required by the Learn option.
void AppendAlgorithmParameters(std::string &algorithmParameters) const override
Provide a string that can be used to recreate an instance of this algorithm.
void Derive(vtkStatisticalModel *) override
Execute the calculations required by the Derive option.
double Determinant
Store the smooth matrix parameter H.
static vtkHighestDensityRegionsStatistics * New()
int GetMaximumNumberOfColumnsPerRequest() const override
This filter requires bivariate requests.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double ComputeHDR(vtkDataArray *inObservations, vtkDataArray *outDensity)
Fill outDensity with density vector that is computed from inObservations values.
std::size_t ConsumeNextAlgorithmParameter(vtkStringToken parameterName, const std::string &algorithmParameters) override
Implement the inverse of AppendAlgorithmParameters(): given parameters, update this algorithm.
void SetSigmaMatrix(double s11, double s12, double s21, double s22)
Set the gaussian kernel matrix.
double InvSigmaC2[2]
Store the smooth matrix parameter H.
void Assess(vtkTable *, vtkStatisticalModel *, vtkTable *) override
Execute the calculations required by the Assess option.
double ComputeHDR(vtkDataArray *inObs, vtkDataArray *inPOI, vtkDataArray *outDensity)
Fill outDensity with density vector defined by inPOI and computed from the inObs values.
void SetSigma(double sigma)
Set the width of the gaussian kernel.
double SmoothHC1[2]
Store the smooth matrix parameter H.
double SmoothHC2[2]
Store the smooth matrix parameter H.
bool Aggregate(vtkDataObjectCollection *, vtkStatisticalModel *) override
Given a collection of models, calculate aggregate model.
void SelectAssessFunctor(vtkTable *, vtkDataObject *, vtkStringArray *, AssessFunctor *&) override
Provide the appropriate assessment functor.
a simple class to control print indentation
Definition vtkIndent.h:108
a base class for statistical modeling of other data
A base class for a functor that assesses data.
vtkStatisticsAlgorithm()
Return a new instance of a subclass named and configured by the algorithmParameters.
a vtkAbstractArray subclass for strings
Represent a string by its integer hash.
A table, which contains similar-typed columns of data.
Definition vtkTable.h:169
A type representing the union of many types.
Definition vtkVariant.h:162
#define vtkDataArray
int vtkIdType
Definition vtkType.h:368