VTK  9.2.6
vtkNetCDFCAMReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkNetCDFCAMReader.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 =========================================================================*/
31 #ifndef vtkNetCDFCAMReader_h
32 #define vtkNetCDFCAMReader_h
33 
34 #include "vtkIONetCDFModule.h" // For export macro
36 
37 class vtkCallbackCommand;
39 
40 class VTKIONETCDF_EXPORT vtkNetCDFCAMReader : public vtkUnstructuredGridAlgorithm
41 {
42 public:
43  static vtkNetCDFCAMReader* New();
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
53  static int CanReadFile(VTK_FILEPATH const char* fileName);
54 
55  void SetFileName(VTK_FILEPATH const char* fileName);
56  vtkGetFilePathMacro(FileName);
57 
58  void SetConnectivityFileName(VTK_FILEPATH const char* fileName);
59  vtkGetFilePathMacro(ConnectivityFileName);
60 
62 
75  {
79  VERTICAL_DIMENSION_COUNT
80  };
81  vtkSetClampMacro(VerticalDimension, int, 0, 2);
82  vtkGetMacro(VerticalDimension, int);
84 
86 
92  vtkBooleanMacro(SingleMidpointLayer, vtkTypeBool);
93  vtkSetMacro(SingleMidpointLayer, vtkTypeBool);
94  vtkGetMacro(SingleMidpointLayer, vtkTypeBool);
95  vtkSetMacro(MidpointLayerIndex, int);
96  vtkGetMacro(MidpointLayerIndex, int);
97  vtkGetVector2Macro(MidpointLayersRange, int);
98 
99  vtkBooleanMacro(SingleInterfaceLayer, vtkTypeBool);
100  vtkSetMacro(SingleInterfaceLayer, vtkTypeBool);
101  vtkGetMacro(SingleInterfaceLayer, vtkTypeBool);
102  vtkSetMacro(InterfaceLayerIndex, int);
103  vtkGetMacro(InterfaceLayerIndex, int);
104  vtkGetVector2Macro(InterfaceLayersRange, int);
106 
108 
112  int GetNumberOfPointArrays();
113  const char* GetPointArrayName(int index);
114  int GetPointArrayStatus(const char* name);
115  void SetPointArrayStatus(const char* name, int status);
116  void DisableAllPointArrays();
117  void EnableAllPointArrays();
119 
120 protected:
122  ~vtkNetCDFCAMReader() override;
123 
125 
127 
129 
135  bool GetPartitioning(size_t piece, size_t numPieces, size_t numCellLevels,
136  size_t numCellsPerLevel, size_t& beginCellLevel, size_t& endCellLevel, size_t& beginCell,
137  size_t& endCell);
138 
139  void BuildVarArray();
140  static void SelectionCallback(
141  vtkObject* caller, unsigned long eid, void* clientdata, void* calldata);
142 
143 private:
144  vtkNetCDFCAMReader(const vtkNetCDFCAMReader&) = delete;
145  void operator=(const vtkNetCDFCAMReader&) = delete;
146 
148 
152  char* FileName;
153  char* CurrentFileName;
154  vtkSetStringMacro(CurrentFileName);
156 
158 
161  char* ConnectivityFileName;
162  char* CurrentConnectivityFileName;
163  vtkSetStringMacro(CurrentConnectivityFileName);
165 
166  int VerticalDimension;
167  double* TimeSteps;
168  size_t NumberOfTimeSteps;
169  vtkDataArraySelection* PointDataArraySelection;
170  vtkCallbackCommand* SelectionObserver;
171 
172  vtkTypeBool SingleMidpointLayer;
173  int MidpointLayerIndex;
174  int MidpointLayersRange[2];
175 
176  vtkTypeBool SingleInterfaceLayer;
177  int InterfaceLayerIndex;
178  int InterfaceLayersRange[2];
179 
180  class Internal;
181  Internal* Internals;
182 };
183 
184 #endif
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
abstract base class for most VTK objects
Definition: vtkObject.h:62
Store vtkAlgorithm input/output information.
static vtkUnstructuredGridAlgorithm * New()
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Read unstructured NetCDF CAM files.
int vtkTypeBool
Definition: vtkABI.h:69
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:39
Store on/off settings for data arrays, etc.
Superclass for algorithms that produce only unstructured grid as output.
VerticalDimension
Set whether to read a single layer, midpoint layers or interface layers.
#define VTK_FILEPATH
Store zero or more vtkInformation instances.
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.