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

Method GetBlockLevel

IO/AMR/vtkAMREnzoReader.cxx:268–285  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

266
267//------------------------------------------------------------------------------
268int vtkAMREnzoReader::GetBlockLevel(int blockIdx)
269{
270 assert("pre: Internal Enzo Reader is nullptr" && (this->Internal != nullptr));
271
272 if (!this->IsReady)
273 {
274 return (-1);
275 }
276
277 this->Internal->ReadMetaData();
278
279 if (blockIdx < 0 || blockIdx >= this->Internal->NumberOfBlocks)
280 {
281 vtkErrorMacro("Block Index (" << blockIdx << ") is out-of-bounds!");
282 return (-1);
283 }
284 return (this->Internal->Blocks[blockIdx + 1].Level);
285}
286
287//------------------------------------------------------------------------------
288int vtkAMREnzoReader::GetNumberOfBlocks()

Callers 2

LoadRequestedBlocksMethod · 0.45
AssignAndLoadBlocksMethod · 0.45

Calls 2

assertFunction · 0.50
ReadMetaDataMethod · 0.45

Tested by

no test coverage detected