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

Method InsertTuple

Common/Core/vtkStringArray.cxx:584–600  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Insert the jth tuple in the source array, at ith location in this array. Note that memory allocation is performed as necessary to hold the data.

Source from the content-addressed store, hash-verified

582// Insert the jth tuple in the source array, at ith location in this array.
583// Note that memory allocation is performed as necessary to hold the data.
584void vtkStringArray::InsertTuple(vtkIdType i, vtkIdType j, vtkAbstractArray* source)
585{
586 vtkStringArray* sa = vtkArrayDownCast<vtkStringArray>(source);
587 if (!sa)
588 {
589 vtkWarningMacro("Input and outputs array data types do not match.");
590 return;
591 }
592
593 vtkIdType loci = i * this->NumberOfComponents;
594 vtkIdType locj = j * sa->GetNumberOfComponents();
595 for (vtkIdType cur = 0; cur < this->NumberOfComponents; cur++)
596 {
597 this->InsertValue(loci + cur, sa->GetValue(locj + cur));
598 }
599 this->DataChanged();
600}
601
602//------------------------------------------------------------------------------
603void vtkStringArray::InsertTuples(vtkIdList* dstIds, vtkIdList* srcIds, vtkAbstractArray* source)

Callers 1

InterpolateTupleMethod · 0.95

Calls 4

InsertValueMethod · 0.95
DataChangedMethod · 0.95
GetNumberOfComponentsMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected