VTK
vtkStrahlerMetric.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkStrahlerMetric.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 //-------------------------------------------------------------------------
16 //Copyright 2008 Sandia Corporation.
17 //Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18 //the U.S. Government retains certain rights in this software.
19 //-------------------------------------------------------------------------
20 //
44 #ifndef vtkStrahlerMetric_h
45 #define vtkStrahlerMetric_h
46 
47 #include "vtkFiltersStatisticsModule.h" // For export macro
48 #include "vtkTreeAlgorithm.h"
49 
50 class vtkFloatArray;
51 
52 class VTKFILTERSSTATISTICS_EXPORT vtkStrahlerMetric : public vtkTreeAlgorithm
53 {
54 public:
55  static vtkStrahlerMetric *New();
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
60 
65  vtkSetStringMacro(MetricArrayName);
67 
69 
74  vtkSetMacro(Normalize, vtkTypeBool);
75  vtkGetMacro(Normalize, vtkTypeBool);
76  vtkBooleanMacro(Normalize, vtkTypeBool);
78 
80 
83  vtkGetMacro(MaxStrahler,float);
85 
86 protected:
88  ~vtkStrahlerMetric() override;
89 
91 
93  float MaxStrahler;
95 
96  float CalculateStrahler(vtkIdType root, vtkFloatArray *metric, vtkTree *graph);
97 
98 private:
99  vtkStrahlerMetric(const vtkStrahlerMetric&) = delete;
100  void operator=(const vtkStrahlerMetric&) = delete;
101 };
102 
103 #endif
104 
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:41
int vtkIdType
Definition: vtkType.h:347
compute Strahler metric for a tree
int vtkTypeBool
Definition: vtkABI.h:69
a simple class to control print indentation
Definition: vtkIndent.h:39
Store zero or more vtkInformation instances.
static vtkTreeAlgorithm * New()
A rooted tree data structure.
Definition: vtkTree.h:60
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.