VTK
dox/Filters/Statistics/vtkStrahlerMetric.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkStrahlerMetric.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010   This software is distributed WITHOUT ANY WARRANTY; without even
00011   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012   PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 //-------------------------------------------------------------------------
00016 //Copyright 2008 Sandia Corporation.
00017 //Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018 //the U.S. Government retains certain rights in this software.
00019 //-------------------------------------------------------------------------
00020 //
00043 #ifndef __vtkStrahlerMetric_h
00044 #define __vtkStrahlerMetric_h
00045 
00046 #include "vtkFiltersStatisticsModule.h" // For export macro
00047 #include "vtkTreeAlgorithm.h"
00048 
00049 class vtkFloatArray;
00050 
00051 class VTKFILTERSSTATISTICS_EXPORT vtkStrahlerMetric : public vtkTreeAlgorithm
00052 {
00053 public:
00054   static vtkStrahlerMetric *New();
00055   vtkTypeMacro(vtkStrahlerMetric,vtkTreeAlgorithm);
00056   void PrintSelf(ostream& os, vtkIndent indent);
00057 
00059 
00061   vtkSetStringMacro(MetricArrayName);
00063 
00065 
00068   vtkSetMacro(Normalize, int);
00069   vtkGetMacro(Normalize, int);
00070   vtkBooleanMacro(Normalize, int);
00072 
00074 
00075   vtkGetMacro(MaxStrahler,float);
00077 
00078 protected:
00079   vtkStrahlerMetric();
00080   ~vtkStrahlerMetric();
00081 
00082   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00083 
00084   int Normalize;
00085   float MaxStrahler;
00086   char *MetricArrayName;
00087 
00088   float CalculateStrahler(vtkIdType root, vtkFloatArray *metric, vtkTree *graph);
00089 
00090 private:
00091   vtkStrahlerMetric(const vtkStrahlerMetric&);  // Not implemented.
00092   void operator=(const vtkStrahlerMetric&);  // Not implemented.
00093 };
00094 
00095 #endif
00096