12 #ifndef CXCOLORVARIATIONFILTER_H
13 #define CXCOLORVARIATIONFILTER_H
35 virtual QString getType()
const;
36 virtual QString getName()
const;
37 virtual QString getHelp()
const;
38 static QString getNameSuffixColorVariation();
41 virtual bool execute();
42 MeshPtr execute(
MeshPtr inputMesh,
double globaleVariance,
double localeVariance,
int smoothingIterations);
43 virtual bool postProcess();
46 virtual void createOptions();
47 virtual void createInputTypes();
48 virtual void createOutputTypes();
57 void applyColorToNeighbourPolys(
int startIndex,
double R,
double G,
double B);
58 std::vector<vtkIdType> applyColorAndFindNeighbours(
int pointIndex,
double R,
double G,
double B);
59 void generateColorDistribution();
60 std::vector<double> generateColor(
double R,
double G,
double B);
61 void smoothColorsInMesh(
int iterations = 1);
65 std::vector<std::vector<vtkIdType>> mPolyToPointsArray;
66 std::vector<std::vector<vtkIdType>> mPointToPolysArray;
67 std::vector<bool> mAssignedColorValues;
68 double mGlobalVariance;
69 double mLocalVariance;
73 std::normal_distribution<> mR_dist;
74 std::normal_distribution<> mG_dist;
75 std::normal_distribution<> mB_dist;
76 std::random_device m_rd{};
77 std::mt19937 m_gen{m_rd()};
85 #endif // CXCOLORVARIATIONFILTER_H