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
39
40class VTKIONETCDF_EXPORT vtkNetCDFCAMReader : public vtkUnstructuredGridAlgorithm
41{
42public:
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);
57
58 void SetConnectivityFileName(VTK_FILEPATH const char* fileName);
59 vtkGetFilePathMacro(ConnectivityFileName);
60
62
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
113 const char* GetPointArrayName(int index);
114 int GetPointArrayStatus(const char* name);
115 void SetPointArrayStatus(const char* name, int status);
119
120protected:
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
140 static void SelectionCallback(
141 vtkObject* caller, unsigned long eid, void* clientdata, void* calldata);
142
143private:
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
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
supports function callbacks
Store on/off settings for data arrays, etc.
a simple class to control print indentation
Definition vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Read unstructured NetCDF CAM files.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
void SetFileName(VTK_FILEPATH const char *fileName)
static void SelectionCallback(vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkNetCDFCAMReader * New()
int GetPointArrayStatus(const char *name)
The following methods allow selective reading of variables.
void SetConnectivityFileName(VTK_FILEPATH const char *fileName)
VerticalDimension
Set whether to read a single layer, midpoint layers or interface layers.
const char * GetPointArrayName(int index)
The following methods allow selective reading of variables.
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.
vtkGetFilePathMacro(FileName)
void DisableAllPointArrays()
The following methods allow selective reading of variables.
int GetNumberOfPointArrays()
The following methods allow selective reading of variables.
void SetPointArrayStatus(const char *name, int status)
The following methods allow selective reading of variables.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static int CanReadFile(VTK_FILEPATH const char *fileName)
Returns 1 if this file can be read and 0 if the file cannot be read.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkNetCDFCAMReader() override
vtkGetFilePathMacro(ConnectivityFileName)
void EnableAllPointArrays()
The following methods allow selective reading of variables.
abstract base class for most VTK objects
Definition vtkObject.h:63
Superclass for algorithms that produce only unstructured grid as output.
int vtkTypeBool
Definition vtkABI.h:69
#define VTK_FILEPATH