VTK  9.3.1
vtkGraphWeightEuclideanDistanceFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
15 #ifndef vtkGraphWeightEuclideanDistanceFilter_h
16 #define vtkGraphWeightEuclideanDistanceFilter_h
17 
18 #include "vtkFiltersGeneralModule.h" // For export macro
19 #include "vtkGraphWeightFilter.h"
20 
21 VTK_ABI_NAMESPACE_BEGIN
22 class vtkGraph;
23 
24 class VTKFILTERSGENERAL_EXPORT vtkGraphWeightEuclideanDistanceFilter : public vtkGraphWeightFilter
25 {
26 public:
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
31 protected:
33  ~vtkGraphWeightEuclideanDistanceFilter() override = default;
34 
39  float ComputeWeight(vtkGraph* graph, const vtkEdgeType& edge) const override;
40 
44  bool CheckRequirements(vtkGraph* graph) const override;
45 
46 private:
48  void operator=(const vtkGraphWeightEuclideanDistanceFilter&) = delete;
49 };
50 
51 VTK_ABI_NAMESPACE_END
52 #endif
Base class for filters that weight graph edges.
static vtkGraphAlgorithm * New()
Weights the edges of a graph based on the Euclidean distance between the points.
Base class for graph data types.
Definition: vtkGraph.h:280
virtual bool CheckRequirements(vtkGraph *graph) const
Ensure that the 'graph' is has all properties that are needed to compute the weights.
a simple class to control print indentation
Definition: vtkIndent.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual float ComputeWeight(vtkGraph *graph, const vtkEdgeType &edge) const =0
Compute the weight on the 'graph' for a particular 'edge'.