------------------------------------------------------------------------------
| 36 | |
| 37 | //------------------------------------------------------------------------------ |
| 38 | vtkCartesianGrid* vtkAMRDataObject::GetDataSetAsCartesianGrid(unsigned int level, unsigned int idx) |
| 39 | { |
| 40 | if (!this->AMRMetaData) |
| 41 | { |
| 42 | vtkErrorMacro("AMR is not initialized"); |
| 43 | return nullptr; |
| 44 | } |
| 45 | |
| 46 | if (level >= this->GetNumberOfLevels() || idx >= this->GetNumberOfBlocks(level)) |
| 47 | { |
| 48 | vtkErrorMacro("Invalid data set index: " << level << " " << idx); |
| 49 | return nullptr; |
| 50 | } |
| 51 | |
| 52 | return vtkCartesianGrid::SafeDownCast(this->GetPartition(level, idx)); |
| 53 | } |
| 54 | |
| 55 | //------------------------------------------------------------------------------ |
| 56 | vtkImageData* vtkAMRDataObject::GetDataSetAsImageData(unsigned int level, unsigned int idx) |