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

Method GetUID

IO/Export/vtkJSONDataSetWriter.cxx:494–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

492//------------------------------------------------------------------------------
493
494std::string vtkJSONDataSetWriter::GetUID(vtkDataArray* input, bool& needConversion)
495{
496 auto aosInput = input->ToAOSDataArray();
497 // NOLINTNEXTLINE(bugprone-unsafe-functions)
498 const unsigned char* content = (const unsigned char*)aosInput->GetVoidPointer(0);
499 int size = input->GetNumberOfValues() * input->GetDataTypeSize();
500 std::string hash;
501 vtkJSONDataSetWriter::ComputeMD5(content, size, hash);
502
503 std::stringstream ss;
504 ss << vtkJSONDataSetWriter::GetShortType(input, needConversion) << "_"
505 << input->GetNumberOfValues() << "-" << hash;
506
507 return ss.str();
508}
509
510//------------------------------------------------------------------------------
511

Callers

nothing calls this directly

Calls 6

ToAOSDataArrayMethod · 0.80
ComputeMD5Function · 0.50
GetVoidPointerMethod · 0.45
GetNumberOfValuesMethod · 0.45
GetDataTypeSizeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected