VTK  9.0.2
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 =========================================================================*/
28 #ifndef vtkNetCDFCAMReader_h
29 #define vtkNetCDFCAMReader_h
30 
31 #include "vtkIONetCDFModule.h" // For export macro
33 
34 class vtkCallbackCommand;
36 
37 class VTKIONETCDF_EXPORT vtkNetCDFCAMReader : public vtkUnstructuredGridAlgorithm
38 {
39 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
50  static int CanReadFile(const char* fileName);
51 
52  void SetFileName(const char* fileName);
53  vtkGetStringMacro(FileName);
54 
55  void SetConnectivityFileName(const char* fileName);
56  vtkGetStringMacro(ConnectivityFileName);
57 
59 
72  {
76  VERTICAL_DIMENSION_COUNT
77  };
78  vtkSetClampMacro(VerticalDimension, int, 0, 2);
79  vtkGetMacro(VerticalDimension, int);
81 
83 
89  vtkBooleanMacro(SingleMidpointLayer, vtkTypeBool);
90  vtkSetMacro(SingleMidpointLayer, vtkTypeBool);
91  vtkGetMacro(SingleMidpointLayer, vtkTypeBool);
92  vtkSetMacro(MidpointLayerIndex, int);
93  vtkGetMacro(MidpointLayerIndex, int);
94  vtkGetVector2Macro(MidpointLayersRange, int);
95 
96  vtkBooleanMacro(SingleInterfaceLayer, vtkTypeBool);
97  vtkSetMacro(SingleInterfaceLayer, vtkTypeBool);
98  vtkGetMacro(SingleInterfaceLayer, vtkTypeBool);
99  vtkSetMacro(InterfaceLayerIndex, int);
100  vtkGetMacro(InterfaceLayerIndex, int);
101  vtkGetVector2Macro(InterfaceLayersRange, int);
103 
105 
110  const char* GetPointArrayName(int index);
111  int GetPointArrayStatus(const char* name);
112  void SetPointArrayStatus(const char* name, int status);
116 
117 protected:
120 
122 
124 
126 
132  bool GetPartitioning(size_t piece, size_t numPieces, size_t numCellLevels,
133  size_t numCellsPerLevel, size_t& beginCellLevel, size_t& endCellLevel, size_t& beginCell,
134  size_t& endCell);
135 
137  static void SelectionCallback(
138  vtkObject* caller, unsigned long eid, void* clientdata, void* calldata);
139 
140 private:
141  vtkNetCDFCAMReader(const vtkNetCDFCAMReader&) = delete;
142  void operator=(const vtkNetCDFCAMReader&) = delete;
143 
145 
149  char* FileName;
150  char* CurrentFileName;
151  vtkSetStringMacro(CurrentFileName);
153 
155 
158  char* ConnectivityFileName;
159  char* CurrentConnectivityFileName;
160  vtkSetStringMacro(CurrentConnectivityFileName);
162 
163  int VerticalDimension;
164  double* TimeSteps;
165  size_t NumberOfTimeSteps;
166  vtkDataArraySelection* PointDataArraySelection;
167  vtkCallbackCommand* SelectionObserver;
168 
169  vtkTypeBool SingleMidpointLayer;
170  int MidpointLayerIndex;
171  int MidpointLayersRange[2];
172 
173  vtkTypeBool SingleInterfaceLayer;
174  int InterfaceLayerIndex;
175  int InterfaceLayersRange[2];
176 
177  class Internal;
178  Internal* Internals;
179 };
180 
181 #endif
supports function callbacks
Store on/off settings for data arrays for a vtkSource.
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Read unstructured NetCDF CAM files.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
static void SelectionCallback(vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetConnectivityFileName(const char *fileName)
int GetPointArrayStatus(const char *name)
VerticalDimension
Set whether to read a single layer, midpoint layers or interface layers.
bool GetPartitioning(size_t piece, size_t numPieces, size_t numCellLevels, size_t numCellsPerLevel, size_t &beginCellLevel, size_t &endCellLevel, size_t &beginCell, size_t &endCell)
Returns true for success.
const char * GetPointArrayName(int index)
void DisableAllPointArrays()
int GetNumberOfPointArrays()
The following methods allow selective reading of variables.
void SetPointArrayStatus(const char *name, int status)
void SetFileName(const char *fileName)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkNetCDFCAMReader() override
void EnableAllPointArrays()
static int CanReadFile(const char *fileName)
Returns 1 if this file can be read and 0 if the file cannot be read.
static vtkNetCDFCAMReader * New()
abstract base class for most VTK objects
Definition: vtkObject.h:63
Superclass for algorithms that produce only unstructured grid as output.
@ name
Definition: vtkX3D.h:225
@ index
Definition: vtkX3D.h:252
int vtkTypeBool
Definition: vtkABI.h:69