VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 //
43 #ifndef __vtkStrahlerMetric_h
44 #define __vtkStrahlerMetric_h
45 
46 #include "vtkFiltersStatisticsModule.h" // For export macro
47 #include "vtkTreeAlgorithm.h"
48 
49 class vtkFloatArray;
50 
51 class VTKFILTERSSTATISTICS_EXPORT vtkStrahlerMetric : public vtkTreeAlgorithm
52 {
53 public:
54  static vtkStrahlerMetric *New();
55  vtkTypeMacro(vtkStrahlerMetric,vtkTreeAlgorithm);
56  void PrintSelf(ostream& os, vtkIndent indent);
57 
59 
61  vtkSetStringMacro(MetricArrayName);
63 
65 
68  vtkSetMacro(Normalize, int);
69  vtkGetMacro(Normalize, int);
70  vtkBooleanMacro(Normalize, int);
72 
74 
75  vtkGetMacro(MaxStrahler,float);
77 
78 protected:
81 
82  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
83 
84  int Normalize;
85  float MaxStrahler;
87 
88  float CalculateStrahler(vtkIdType root, vtkFloatArray *metric, vtkTree *graph);
89 
90 private:
91  vtkStrahlerMetric(const vtkStrahlerMetric&); // Not implemented.
92  void operator=(const vtkStrahlerMetric&); // Not implemented.
93 };
94 
95 #endif
96 
compute Strahler metric for a tree