VTK
vtkAMRFlashReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAMRFlashReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14  =========================================================================*/
23 #ifndef vtkAMRFlashReader_h
24 #define vtkAMRFlashReader_h
25 
26 #include "vtkIOAMRModule.h" // For export macro
27 #include "vtkAMRBaseReader.h"
28 
29 class vtkOverlappingAMR;
31 
32 class VTKIOAMR_EXPORT vtkAMRFlashReader : public vtkAMRBaseReader
33 {
34 public:
35  static vtkAMRFlashReader* New();
37  void PrintSelf(ostream &os, vtkIndent indent ) override;
38 
42  int GetNumberOfBlocks() override;
43 
47  int GetNumberOfLevels() override;
48 
52  void SetFileName( const char* fileName ) override;
53 
54 protected:
56  ~vtkAMRFlashReader() override;
57 
61  void ReadMetaData() override;
62 
66  int GetBlockLevel( const int blockIdx ) override;
67 
71  int FillMetaData( ) override;
72 
76  vtkUniformGrid* GetAMRGrid( const int blockIdx ) override;
77 
81  void GetAMRGridData(
82  const int blockIdx, vtkUniformGrid *block, const char *field) override;
83 
88  const int vtkNotUsed(blockIdx), vtkUniformGrid *vtkNotUsed(block), const char *vtkNotUsed(field)) override {;}
89 
93  void SetUpDataArraySelections() override;
94 
95  bool IsReady;
96 
97 private:
98  vtkAMRFlashReader( const vtkAMRFlashReader& ) = delete;
99  void operator=(const vtkAMRFlashReader& ) = delete;
100 
101  void ComputeStats(vtkFlashReaderInternal* internal, std::vector<int>& numBlocks, double min[3]);
102  vtkFlashReaderInternal *Internal;
103 };
104 
105 #endif /* vtkAMRFlashReader_h */
virtual vtkUniformGrid * GetAMRGrid(const int blockIdx)=0
Loads the block according to the index w.r.t.
virtual int GetNumberOfBlocks()=0
Returns the total number of blocks.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void GetAMRGridPointData(const int vtkNotUsed(blockIdx), vtkUniformGrid *vtkNotUsed(block), const char *vtkNotUsed(field)) override
See vtkAMRBaseReader::GetAMRGridData.
virtual void ReadMetaData()=0
Reads all the metadata from the file.
virtual int GetNumberOfLevels()=0
Returns the total number of levels.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void GetAMRGridData(const int blockIdx, vtkUniformGrid *block, const char *field)=0
Loads the block data.
virtual int GetBlockLevel(const int blockIdx)=0
Returns the block level for the given block.
image data with blanking
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.
virtual void SetFileName(const char *fileName)=0
Set/Get the filename.