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

Method RestoreMeshCache

IO/NetCDF/vtkSLACReader.cxx:1743–1766  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1741
1742//------------------------------------------------------------------------------
1743int vtkSLACReader::RestoreMeshCache(vtkMultiBlockDataSet* surfaceOutput,
1744 vtkMultiBlockDataSet* volumeOutput, vtkMultiBlockDataSet* compositeOutput)
1745{
1746 surfaceOutput->CompositeShallowCopy(
1747 vtkCompositeDataSet::SafeDownCast(this->Internal->MeshCache->GetBlock(SURFACE_OUTPUT)));
1748 volumeOutput->CompositeShallowCopy(
1749 vtkCompositeDataSet::SafeDownCast(this->Internal->MeshCache->GetBlock(VOLUME_OUTPUT)));
1750
1751 // Shove two outputs in composite output.
1752 compositeOutput->SetNumberOfBlocks(2);
1753 compositeOutput->SetBlock(SURFACE_OUTPUT, surfaceOutput);
1754 compositeOutput->SetBlock(VOLUME_OUTPUT, volumeOutput);
1755 compositeOutput->GetMetaData(static_cast<unsigned int>(SURFACE_OUTPUT))
1756 ->Set(vtkCompositeDataSet::NAME(), "Internal Volume");
1757 compositeOutput->GetMetaData(static_cast<unsigned int>(VOLUME_OUTPUT))
1758 ->Set(vtkCompositeDataSet::NAME(), "External Surface");
1759
1760 compositeOutput->GetInformation()->Set(vtkSLACReader::POINTS(), this->Internal->PointCache);
1761
1762 VTK_CREATE(vtkPointData, pd);
1763 compositeOutput->GetInformation()->Set(vtkSLACReader::POINT_DATA(), pd);
1764
1765 return 1;
1766}
1767VTK_ABI_NAMESPACE_END

Callers 1

RequestDataMethod · 0.95

Calls 7

GetBlockMethod · 0.80
SetNumberOfBlocksMethod · 0.80
SetBlockMethod · 0.80
CompositeShallowCopyMethod · 0.45
SetMethod · 0.45
GetMetaDataMethod · 0.45
GetInformationMethod · 0.45

Tested by

no test coverage detected