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) VTK_OVERRIDE;
58 
60 
65  vtkSetStringMacro(MetricArrayName);
67 
69 
74  vtkSetMacro(Normalize, int);
75  vtkGetMacro(Normalize, int);
76  vtkBooleanMacro(Normalize, int);
78 
80 
83  vtkGetMacro(MaxStrahler,float);
85 
86 protected:
88  ~vtkStrahlerMetric() VTK_OVERRIDE;
89 
90  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
91 
92  int Normalize;
93  float MaxStrahler;
94  char *MetricArrayName;
95 
96  float CalculateStrahler(vtkIdType root, vtkFloatArray *metric, vtkTree *graph);
97 
98 private:
99  vtkStrahlerMetric(const vtkStrahlerMetric&) VTK_DELETE_FUNCTION;
100  void operator=(const vtkStrahlerMetric&) VTK_DELETE_FUNCTION;
101 };
102 
103 #endif
104 
Superclass for algorithms that produce only Tree as output.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:41
int vtkIdType
Definition: vtkType.h:287
compute Strahler metric for a tree
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Store zero or more vtkInformation instances.
static vtkTreeAlgorithm * New()
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
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.