VTK
vtkGraphWeightEuclideanDistanceFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGraphWeightEuclideanDistanceFilter.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 =========================================================================*/
27 #ifndef vtkGraphWeightEuclideanDistanceFilter_h
28 #define vtkGraphWeightEuclideanDistanceFilter_h
29 
30 #include "vtkFiltersGeneralModule.h" // For export macro
31 #include "vtkGraphWeightFilter.h"
32 
33 class vtkGraph;
34 
35 class VTKFILTERSGENERAL_EXPORT vtkGraphWeightEuclideanDistanceFilter : public vtkGraphWeightFilter
36 {
37  public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
42 protected:
45 
50  float ComputeWeight(vtkGraph* const graph, const vtkEdgeType& edge) const override;
51 
55  bool CheckRequirements(vtkGraph* const graph) const override;
56 
57 private:
59  void operator=(const vtkGraphWeightEuclideanDistanceFilter&) = delete;
60 };
61 
62 #endif
Base class for filters that weight graph edges.
static vtkGraphAlgorithm * New()
virtual bool CheckRequirements(vtkGraph *const graph) const
Ensure that the 'graph' is has all properties that are needed to compute the weights.
Weights the edges of a graph based on the Euclidean distance between the points.
virtual float ComputeWeight(vtkGraph *const graph, const vtkEdgeType &edge) const =0
Compute the weight on the 'graph' for a particular 'edge'.
Base class for graph data types.
Definition: vtkGraph.h:287
a simple class to control print indentation
Definition: vtkIndent.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.