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

Function getBlockName

IO/HDF/vtkHDFWriter.cxx:51–63  ·  view source on GitHub ↗

* Return the name of a partitioned dataset in a pdc given its index. * If not set, generate a name based on the id. */

Source from the content-addressed store, hash-verified

49 * If not set, generate a name based on the id.
50 */
51std::string getBlockName(vtkPartitionedDataSetCollection* pdc, unsigned int datasetId)
52{
53 std::string name;
54 if (pdc->GetMetaData(datasetId) && pdc->GetMetaData(datasetId)->Has(vtkCompositeDataSet::NAME()))
55 {
56 name = pdc->GetMetaData(datasetId)->Get(vtkCompositeDataSet::NAME());
57 }
58 if (name.empty())
59 {
60 name = "Block" + vtk::to_string(datasetId);
61 }
62 return name;
63}
64
65/**
66 * Return the filename for an external file containing <blockname>, made from

Callers 2

AppendBlocksMethod · 0.85
AppendAssemblyMethod · 0.85

Calls 5

to_stringFunction · 0.50
GetMetaDataMethod · 0.45
HasMethod · 0.45
GetMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected