VTK
vtkAMREnzoReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAMREnzoReader.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  =========================================================================*/
25 #ifndef VTKAMRENZOREADER_H_
26 #define VTKAMRENZOREADER_H_
27 
28 #include "vtkIOAMRModule.h" // For export macro
29 #include "vtkAMRBaseReader.h"
30 
31 #include <map> // For STL map
32 #include <string> // For std::string
33 
34 class vtkOverlappingAMR;
36 
38 {
39 public:
40  static vtkAMREnzoReader* New();
42  void PrintSelf(ostream &os, vtkIndent indent );
43 
45 
46  vtkSetMacro( ConvertToCGS, int );
47  vtkGetMacro( ConvertToCGS, int );
48  vtkBooleanMacro( ConvertToCGS, int );
50 
53 
56 
58  void SetFileName( const char* fileName );
59 
60 protected:
63 
67 
71 
74  void ParseLabel(const std::string labelString,int &idx,std::string &label);
75 
78  void ParseCFactor(const std::string labelString, int &idx, double &factor );
79 
84 
86  void ReadMetaData();
87 
89  int GetBlockLevel( const int blockIdx );
90 
91  void ComputeStats(vtkEnzoReaderInternal* internal, std::vector<int>& blocksPerLevel, double min[3]);
92 
94  int FillMetaData( );
95 
97  vtkUniformGrid* GetAMRGrid( const int blockIdx );
98 
100 
102  const int blockIdx, vtkUniformGrid *block, const char *field);
104 
106 
108  const int vtkNotUsed(blockIdx), vtkUniformGrid *vtkNotUsed(block), const char *vtkNotUsed(field)) {;};
110 
113 
115  bool IsReady;
116 
117 private:
118  vtkAMREnzoReader( const vtkAMREnzoReader& ); // Not Implemented
119  void operator=(const vtkAMREnzoReader& ); // Not Implemented
120 
121  vtkEnzoReaderInternal *Internal;
122 
123  std::map< std::string, int > label2idx;
124  std::map< int, double > conversionFactors;
125 };
126 
127 #endif /* VTKAMRENZOREADER_H_ */
vtkAMREnzoReader::GetConversionFactor
double GetConversionFactor(const std::string name)
vtkAMREnzoReader::vtkAMREnzoReader
vtkAMREnzoReader()
vtkAMREnzoReader::GetBlockLevel
int GetBlockLevel(const int blockIdx)
vtkAMREnzoReader::ConvertToCGS
int ConvertToCGS
Definition: vtkAMREnzoReader.h:114
vtkUniformGrid
image data with blanking
Definition: vtkUniformGrid.h:40
vtkEnzoReaderInternal
Definition: vtkAMREnzoReaderInternal.h:111
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkAMREnzoReader::ComputeStats
void ComputeStats(vtkEnzoReaderInternal *internal, std::vector< int > &blocksPerLevel, double min[3])
VTKIOAMR_EXPORT
#define VTKIOAMR_EXPORT
Definition: vtkIOAMRModule.h:15
vtkAMREnzoReader::GetAMRGridData
void GetAMRGridData(const int blockIdx, vtkUniformGrid *block, const char *field)
vtkAMREnzoReader::ReadMetaData
void ReadMetaData()
vtkAMREnzoReader::IsReady
bool IsReady
Definition: vtkAMREnzoReader.h:115
vtkAMREnzoReader::GetNumberOfBlocks
int GetNumberOfBlocks()
vtkAMREnzoReader::ParseCFactor
void ParseCFactor(const std::string labelString, int &idx, double &factor)
vtkAMREnzoReader::ParseLabel
void ParseLabel(const std::string labelString, int &idx, std::string &label)
vtkAMRBaseReader
Definition: vtkAMRBaseReader.h:42
vtkAMREnzoReader::GetIndexFromArrayName
int GetIndexFromArrayName(std::string arrayName)
vtkAMREnzoReader::GetAMRGrid
vtkUniformGrid * GetAMRGrid(const int blockIdx)
vtkgl::name
GLuint const GLchar * name
Definition: vtkgl.h:11983
vtkNotUsed
#define vtkNotUsed(x)
Definition: vtkSetGet.h:557
vtkIOAMRModule.h
vtkAMREnzoReader::GetNumberOfLevels
int GetNumberOfLevels()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkX3D::field
@ field
Definition: vtkX3D.h:177
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkOverlappingAMR
hierarchical dataset of vtkUniformGrids
Definition: vtkOverlappingAMR.h:46
vtkAMREnzoReader::~vtkAMREnzoReader
~vtkAMREnzoReader()
vtkAMREnzoReader::SetUpDataArraySelections
void SetUpDataArraySelections()
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkAMREnzoReader::FillMetaData
int FillMetaData()
vtkAMREnzoReader::ParseConversionFactors
void ParseConversionFactors()
vtkAMREnzoReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkAMREnzoReader::New
static vtkAMREnzoReader * New()
vtkAMREnzoReader::GetAMRGridPointData
void GetAMRGridPointData(const int vtkNotUsed(blockIdx), vtkUniformGrid *vtkNotUsed(block), const char *vtkNotUsed(field))
Definition: vtkAMREnzoReader.h:107
vtkAMREnzoReader::SetFileName
void SetFileName(const char *fileName)
vtkgl::string
GLsizei const GLchar ** string
Definition: vtkgl.h:12011
vtkAMRBaseReader.h
vtkAMREnzoReader
Definition: vtkAMREnzoReader.h:38