VTK
dox/Infovis/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 "vtkTreeAlgorithm.h"
00047 
00048 class vtkFloatArray;
00049 
00050 class VTK_INFOVIS_EXPORT vtkStrahlerMetric : public vtkTreeAlgorithm
00051 {
00052 public:
00053   static vtkStrahlerMetric *New();
00054   vtkTypeMacro(vtkStrahlerMetric,vtkTreeAlgorithm);
00055   void PrintSelf(ostream& os, vtkIndent indent);
00056 
00058 
00060   vtkSetStringMacro(MetricArrayName);
00062   
00064 
00067   vtkSetMacro(Normalize, int);
00068   vtkGetMacro(Normalize, int);
00069   vtkBooleanMacro(Normalize, int);
00071 
00073 
00074   vtkGetMacro(MaxStrahler,float);
00076 
00077 protected:
00078   vtkStrahlerMetric();
00079   ~vtkStrahlerMetric();
00080    
00081   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00082   
00083   int Normalize;
00084   float MaxStrahler;
00085   char *MetricArrayName;
00086 
00087   float CalculateStrahler(vtkIdType root, vtkFloatArray *metric, vtkTree *graph);
00088   
00089 private:
00090   vtkStrahlerMetric(const vtkStrahlerMetric&);  // Not implemented.
00091   void operator=(const vtkStrahlerMetric&);  // Not implemented.
00092 };
00093 
00094 #endif
00095