VTK  9.3.1
vtkStrahlerMetric.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
27 #ifndef vtkStrahlerMetric_h
28 #define vtkStrahlerMetric_h
29 
30 #include "vtkFiltersStatisticsModule.h" // For export macro
31 #include "vtkTreeAlgorithm.h"
32 
33 VTK_ABI_NAMESPACE_BEGIN
34 class vtkFloatArray;
35 
36 class VTKFILTERSSTATISTICS_EXPORT vtkStrahlerMetric : public vtkTreeAlgorithm
37 {
38 public:
39  static vtkStrahlerMetric* New();
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
49  vtkSetStringMacro(MetricArrayName);
51 
53 
58  vtkSetMacro(Normalize, vtkTypeBool);
59  vtkGetMacro(Normalize, vtkTypeBool);
60  vtkBooleanMacro(Normalize, vtkTypeBool);
62 
64 
67  vtkGetMacro(MaxStrahler, float);
69 
70 protected:
72  ~vtkStrahlerMetric() override;
73 
75 
77  float MaxStrahler;
79 
80  float CalculateStrahler(vtkIdType root, vtkFloatArray* metric, vtkTree* tree);
81 
82 private:
83  vtkStrahlerMetric(const vtkStrahlerMetric&) = delete;
84  void operator=(const vtkStrahlerMetric&) = delete;
85 };
86 
87 VTK_ABI_NAMESPACE_END
88 #endif
Superclass for algorithms that produce only Tree as output.
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:30
int vtkIdType
Definition: vtkType.h:315
compute Strahler metric for a tree
int vtkTypeBool
Definition: vtkABI.h:64
a simple class to control print indentation
Definition: vtkIndent.h:28
Store zero or more vtkInformation instances.
static vtkTreeAlgorithm * New()
A rooted tree data structure.
Definition: vtkTree.h:45
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.