MCPcopy Create free account
hub / github.com/Kitware/ParaView / CopyFromGenericAttribute

Method CopyFromGenericAttribute

Remoting/Core/vtkPVArrayInformation.cxx:419–441  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

417
418//----------------------------------------------------------------------------
419void vtkPVArrayInformation::CopyFromGenericAttribute(vtkGenericAttribute* array)
420{
421 assert(array != nullptr);
422 assert(this->Components.size() == 0); // sanity check.
423
424 this->Name = array->GetName() ? array->GetName() : "";
425 this->DataType = array->GetComponentType();
426
427 const int numComponents = array->GetNumberOfComponents();
428 this->Components.resize(numComponents + 1); // extra 1 for magnitude.
429
430 for (int comp = -1; comp < numComponents; ++comp)
431 {
432 auto& compInfo = this->Components.at(comp + 1);
433 array->GetRange(comp, compInfo.Range.GetData());
434 // since vtkGenericAttribute doesn't have separate finite-range,
435 // we just copy the normal range.
436 compInfo.FiniteRange = compInfo.Range;
437
438 // set default names.
439 compInfo.DefaultName = vtkPVPostFilter::DefaultComponentName(comp, numComponents);
440 }
441}
442
443//----------------------------------------------------------------------------
444void vtkPVArrayInformation::CopyToStream(vtkClientServerStream* css) const

Callers 1

CopyFromDataObjectMethod · 0.80

Calls 6

sizeMethod · 0.45
GetNameMethod · 0.45
GetNumberOfComponentsMethod · 0.45
resizeMethod · 0.45
GetRangeMethod · 0.45
GetDataMethod · 0.45

Tested by

no test coverage detected