VTK  9.3.1
vtkTreeFieldAggregator.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
22 #ifndef vtkTreeFieldAggregator_h
23 #define vtkTreeFieldAggregator_h
24 
25 #include "vtkInfovisCoreModule.h" // For export macro
26 #include "vtkTreeAlgorithm.h"
27 
28 VTK_ABI_NAMESPACE_BEGIN
29 class vtkPoints;
30 class vtkTree;
31 
32 class VTKINFOVISCORE_EXPORT vtkTreeFieldAggregator : public vtkTreeAlgorithm
33 {
34 public:
35  static vtkTreeFieldAggregator* New();
36 
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
41 
45  vtkGetStringMacro(Field);
46  vtkSetStringMacro(Field);
48 
50 
53  vtkGetMacro(MinValue, double);
54  vtkSetMacro(MinValue, double);
56 
58 
61  vtkSetMacro(LeafVertexUnitSize, bool);
62  vtkGetMacro(LeafVertexUnitSize, bool);
63  vtkBooleanMacro(LeafVertexUnitSize, bool);
65 
67 
70  vtkSetMacro(LogScale, bool);
71  vtkGetMacro(LogScale, bool);
72  vtkBooleanMacro(LogScale, bool);
74 
75 protected:
77  ~vtkTreeFieldAggregator() override;
78 
80 
81 private:
82  char* Field;
83  bool LeafVertexUnitSize;
84  bool LogScale;
85  double MinValue;
87  void operator=(const vtkTreeFieldAggregator&) = delete;
88  double GetDoubleValue(vtkAbstractArray* arr, vtkIdType id);
89  static void SetDoubleValue(vtkAbstractArray* arr, vtkIdType id, double value);
90 };
91 
92 VTK_ABI_NAMESPACE_END
93 #endif
Superclass for algorithms that produce only Tree as output.
Store vtkAlgorithm input/output information.
Abstract superclass for all arrays.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
bool GetDoubleValue(const nlohmann::json &root, const std::string &key, double &value)
Get double value from Json variable, with existence and type checks.
int vtkIdType
Definition: vtkType.h:315
a simple class to control print indentation
Definition: vtkIndent.h:28
aggregate field values from the leaves up the tree
Store zero or more vtkInformation instances.
static vtkTreeAlgorithm * New()
A rooted tree data structure.
Definition: vtkTree.h:45
represent and manipulate 3D points
Definition: vtkPoints.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.