vtkPlotEdges.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPlotEdges.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 =========================================================================*/
20 #ifndef vtkPlotEdges_h
21 #define vtkPlotEdges_h
22 
24 #include "vtkPVVTKExtensionsFiltersGeneralModule.h" //needed for exports
25 
26 class Node;
27 class Segment;
28 class vtkPolyData;
29 class vtkCollection;
31 
33 {
34 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
38  static vtkPlotEdges* New();
39 
40 protected:
41  vtkPlotEdges();
42  ~vtkPlotEdges() override;
43 
44  class Node;
45  class Segment;
46 
47  int FillInputPortInformation(int port, vtkInformation* info) override;
48  // Usual data generation method
50 
51  void Process(vtkPolyData* input, vtkMultiBlockDataSet* output);
52  static void ReducePolyData(vtkPolyData* polyData, vtkPolyData* output);
53 
54  void ExtractSegments(vtkPolyData* polyData, vtkCollection* segments, vtkCollection* nodes);
55  static void ExtractSegmentsFromExtremity(vtkPolyData* polyData, vtkCollection* segments,
56  vtkCollection* nodes, char* visitedCells, vtkIdType cellId, vtkIdType pointId, Node* node);
57  static void ConnectSegmentsWithNodes(vtkCollection* segments, vtkCollection* nodes);
58  static void SaveToMultiBlockDataSet(vtkCollection* segments, vtkMultiBlockDataSet* output);
59  static void MergeSegments(vtkCollection* segments, vtkCollection* nodes, Node* node,
60  Segment* segmentA, Segment* segmentB);
61  static vtkPlotEdges::Node* GetNodeAtPoint(vtkCollection* nodes, vtkIdType pointId);
62  static void PrintSegments(vtkCollection* segments);
63 
64 private:
65  vtkPlotEdges(const vtkPlotEdges&) = delete;
66  void operator=(const vtkPlotEdges&) = delete;
67 };
68 
69 #endif
int vtkIdType
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
static vtkMultiBlockDataSetAlgorithm * New()
#define VTKPVVTKEXTENSIONSFILTERSGENERAL_EXPORT
virtual int FillInputPortInformation(int port, vtkInformation *info)
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
void operator=(const vtkObjectBase &)