MCPcopy Create free account
hub / github.com/Kitware/VTK / ProcessTrees

Method ProcessTrees

Filters/HyperTree/vtkHyperTreeGridFeatureEdges.cxx:58–107  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

56
57//------------------------------------------------------------------------------
58int vtkHyperTreeGridFeatureEdges::ProcessTrees(vtkHyperTreeGrid* input, vtkDataObject* outputDO)
59{
60 vtkPolyData* output = vtkPolyData::SafeDownCast(outputDO);
61 if (!output)
62 {
63 vtkErrorMacro("Incorrect type of output: " << outputDO->GetClassName());
64 return 0;
65 }
66
67 this->InData = input->GetCellData();
68 this->OutData = output->GetCellData();
69 this->OutData->CopyAllocate(this->InData);
70
71 vtkNew<vtkPoints> outPoints;
72 vtkNew<vtkCellArray> outCells;
73
74 if (this->MergePoints)
75 {
76 this->Locator = vtkSmartPointer<vtkMergePoints>::New();
77 this->Locator->InitPointInsertion(outPoints, input->GetBounds());
78 }
79 else
80 {
81 this->Locator = nullptr;
82 }
83
84 // Create a custom internal class depending on the dimension of the input HTG.
85 switch (input->GetDimension())
86 {
87 case 1:
88 this->OrientationAxe1D = input->GetOrientation();
89 this->Process1DHTG(input, outPoints, outCells);
90 break;
91 case 2:
92 this->OrientationAxes2D = ORIENTATION_AXES_2D[input->GetOrientation()];
93 this->Process2DHTG(input, outPoints, outCells);
94 break;
95 case 3:
96 this->Process3DHTG(input, outPoints, outCells);
97 break;
98 default:
99 vtkErrorMacro("Incorrect dimension of input HTG: " << input->GetDimension());
100 return 0;
101 }
102
103 output->SetPoints(outPoints);
104 output->SetLines(outCells);
105
106 return 1;
107}
108
109//----------------------------------------------------------------------------------------------
110void vtkHyperTreeGridFeatureEdges::Process1DHTG(

Callers

nothing calls this directly

Calls 13

Process1DHTGMethod · 0.95
Process2DHTGMethod · 0.95
Process3DHTGMethod · 0.95
SetLinesMethod · 0.80
NewFunction · 0.50
GetClassNameMethod · 0.45
GetCellDataMethod · 0.45
CopyAllocateMethod · 0.45
InitPointInsertionMethod · 0.45
GetBoundsMethod · 0.45
GetDimensionMethod · 0.45
GetOrientationMethod · 0.45

Tested by

no test coverage detected