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

Method RetrieveStepsFromAssembly

IO/HDF/vtkHDFReader.cxx:1580–1613  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1578
1579//------------------------------------------------------------------------------
1580bool vtkHDFReader::RetrieveStepsFromAssembly()
1581{
1582 const std::vector<std::string> datasets =
1583 this->Impl->GetOrderedChildrenOfGroup(vtkHDFUtilities::VTKHDF_ROOT_PATH);
1584 for (const auto& datasetName : datasets)
1585 {
1586 if (datasetName == "Assembly")
1587 {
1588 continue;
1589 }
1590 std::string hdfPathName = vtkHDFUtilities::VTKHDF_ROOT_PATH + "/" + datasetName;
1591 if (!this->Impl->HasAttribute(hdfPathName.c_str(), "Type"))
1592 {
1593 // Do not read the (null) block if type is not set
1594 continue;
1595 }
1596 this->Impl->OpenGroupAsVTKGroup(hdfPathName);
1597 std::size_t nStep = this->Impl->GetNumberOfSteps();
1598
1599 if (nStep > 1)
1600 {
1601 if (this->NumberOfSteps > 1 && this->NumberOfSteps != static_cast<vtkIdType>(nStep))
1602 {
1603 vtkErrorMacro("This composite file has mismatching number of steps between datasets : "
1604 << this->NumberOfSteps << " and " << nStep
1605 << ". Number of steps need to be the same across composite components.");
1606 return false;
1607 }
1608 this->NumberOfSteps = nStep;
1609 this->SetHasTemporalData(true);
1610 }
1611 }
1612 return true;
1613}
1614
1615//------------------------------------------------------------------------------
1616bool vtkHDFReader::RetrieveDataArraysFromAssembly()

Callers 1

SetupInformationMethod · 0.95

Calls 6

SetHasTemporalDataMethod · 0.95
OpenGroupAsVTKGroupMethod · 0.80
HasAttributeMethod · 0.45
c_strMethod · 0.45
GetNumberOfStepsMethod · 0.45

Tested by

no test coverage detected