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

Method GetTuples

Common/Core/vtkDataArray_GetTuples_range.cxx:39–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37} // end anon namespace
38
39VTK_ABI_NAMESPACE_BEGIN
40//------------------------------------------------------------------------------
41void vtkDataArray::GetTuples(vtkIdType p1, vtkIdType p2, vtkAbstractArray* aa)
42{
43 vtkDataArray* da = vtkDataArray::FastDownCast(aa);
44 if (!da)
45 {
46 vtkWarningMacro("Input is not a vtkDataArray.");
47 return;
48 }
49
50 if ((da->GetNumberOfComponents() != this->GetNumberOfComponents()))
51 {
52 vtkErrorMacro("Number of components for input and output do not match.\n"
53 "Source: "
54 << this->GetNumberOfComponents()
55 << "\n"
56 "Destination: "
57 << da->GetNumberOfComponents());
58 return;
59 }
60
61 GetTuplesRangeWorker worker(p1, p2);
62 if (!vtkArrayDispatch::Dispatch2::Execute(this, da, worker))
63 {
64 // Use fallback if dispatch fails.
65 worker(this, da);
66 }
67}
68VTK_ABI_NAMESPACE_END

Callers

nothing calls this directly

Calls 3

FastDownCastFunction · 0.70
ExecuteFunction · 0.50
GetNumberOfComponentsMethod · 0.45

Tested by

no test coverage detected