MCPcopy Create free account
hub / github.com/Kitware/VTK / ConsumeNextAlgorithmParameter

Method ConsumeNextAlgorithmParameter

Filters/Statistics/vtkOrderStatistics.cxx:79–128  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

77
78//------------------------------------------------------------------------------
79std::size_t vtkOrderStatistics::ConsumeNextAlgorithmParameter(
80 vtkStringToken parameterName, const std::string& algorithmParameters)
81{
82 using namespace vtk::literals;
83 std::size_t consumed = 0;
84 switch (parameterName.GetHash())
85 {
86 case "number_of_intervals"_hash:
87 {
88 int value;
89 if ((consumed = this->ConsumeInt(algorithmParameters, value)))
90 {
91 this->SetNumberOfIntervals(value);
92 }
93 }
94 break;
95 case "quantile_definition"_hash:
96 {
97 int value;
98 if ((consumed = this->ConsumeInt(algorithmParameters, value)))
99 {
100 this->SetQuantileDefinition(value);
101 }
102 }
103 break;
104 case "quantize"_hash:
105 {
106 int value;
107 if ((consumed = this->ConsumeInt(algorithmParameters, value)))
108 {
109 this->SetQuantize(value);
110 }
111 }
112 break;
113 case "maximum_histogram_size"_hash:
114 {
115 int value;
116 if ((consumed = this->ConsumeInt(algorithmParameters, value)))
117 {
118 this->SetMaximumHistogramSize(value);
119 }
120 }
121 break;
122 default:
123 consumed =
124 this->Superclass::ConsumeNextAlgorithmParameter(parameterName, algorithmParameters);
125 break;
126 }
127 return consumed;
128}
129
130//------------------------------------------------------------------------------
131void vtkOrderStatistics::SetQuantileDefinition(int qd)

Callers

nothing calls this directly

Calls 3

SetQuantileDefinitionMethod · 0.95
GetHashMethod · 0.80
ConsumeIntMethod · 0.80

Tested by

no test coverage detected