VTK  9.3.1
vtkAMRFlashReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
9 #ifndef vtkAMRFlashReader_h
10 #define vtkAMRFlashReader_h
11 
12 #include "vtkAMRBaseReader.h"
13 #include "vtkIOAMRModule.h" // For export macro
14 
15 VTK_ABI_NAMESPACE_BEGIN
16 class vtkOverlappingAMR;
18 
19 class VTKIOAMR_EXPORT vtkAMRFlashReader : public vtkAMRBaseReader
20 {
21 public:
22  static vtkAMRFlashReader* New();
24  void PrintSelf(ostream& os, vtkIndent indent) override;
25 
29  int GetNumberOfBlocks() override;
30 
34  int GetNumberOfLevels() override;
35 
39  void SetFileName(VTK_FILEPATH const char* fileName) override;
40 
41 protected:
43  ~vtkAMRFlashReader() override;
44 
48  void ReadMetaData() override;
49 
53  int GetBlockLevel(int blockIdx) override;
54 
58  int FillMetaData() override;
59 
63  vtkUniformGrid* GetAMRGrid(int blockIdx) override;
64 
68  void GetAMRGridData(int blockIdx, vtkUniformGrid* block, const char* field) override;
69 
73  void GetAMRGridPointData(int vtkNotUsed(blockIdx), vtkUniformGrid* vtkNotUsed(block),
74  const char* vtkNotUsed(field)) override
75  {
76  }
77 
81  void SetUpDataArraySelections() override;
82 
83  bool IsReady;
84 
85 private:
86  vtkAMRFlashReader(const vtkAMRFlashReader&) = delete;
87  void operator=(const vtkAMRFlashReader&) = delete;
88 
89  void ComputeStats(vtkFlashReaderInternal* internal, std::vector<int>& numBlocks, double min[3]);
90  vtkFlashReaderInternal* Internal;
91 };
92 
93 VTK_ABI_NAMESPACE_END
94 #endif /* vtkAMRFlashReader_h */
virtual int GetNumberOfBlocks()=0
Returns the total number of blocks.
virtual vtkUniformGrid * GetAMRGrid(int blockIdx)=0
Loads the block according to the index w.r.t.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void ReadMetaData()=0
Reads all the metadata from the file.
virtual int GetBlockLevel(int blockIdx)=0
Returns the block level for the given block.
virtual void SetFileName(VTK_FILEPATH const char *fileName)=0
Set/Get the filename.
virtual int GetNumberOfLevels()=0
Returns the total number of levels.
a simple class to control print indentation
Definition: vtkIndent.h:28
void GetAMRGridPointData(int vtkNotUsed(blockIdx), vtkUniformGrid *vtkNotUsed(block), const char *vtkNotUsed(field)) override
See vtkAMRBaseReader::GetAMRGridData.
virtual void GetAMRGridData(int blockIdx, vtkUniformGrid *block, const char *field)=0
Loads the block data.
image data with blanking
#define VTK_FILEPATH
hierarchical dataset of vtkUniformGrids
An abstract class that encapsulates common functionality for all AMR readers.
static vtkOverlappingAMRAlgorithm * New()
virtual int FillMetaData()=0
Loads all the AMR metadata & constructs the LevelIdxPair12InternalIdx datastructure which maps (level...
virtual void SetUpDataArraySelections()=0
Initializes the PointDataArraySelection & CellDataArraySelection.