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

Method GetTuples

Common/Core/vtkDataArray_GetTuples_ids.cxx:41–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

FastDownCastFunction · 0.70
ExecuteFunction · 0.50
GetClassNameMethod · 0.45
GetNumberOfComponentsMethod · 0.45

Tested by

no test coverage detected