VTK
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 NcFile;
38 class vtkCallbackCommand;
40 
41 class VTKIONETCDF_EXPORT vtkNetCDFCAMReader : public vtkUnstructuredGridAlgorithm
42 {
43 public:
44  static vtkNetCDFCAMReader *New();
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
54  static int CanReadFile(const char* fileName);
55 
56  void SetFileName(const char* fileName);
57  vtkGetStringMacro(FileName);
58 
59  void SetConnectivityFileName(const char* fileName);
60  vtkGetStringMacro(ConnectivityFileName);
61 
63 
74  VTK_LEGACY(virtual void SingleLevelOn ());
75  VTK_LEGACY(virtual void SingleLevelOff ());
76  VTK_LEGACY(virtual void SetSingleLevel (int level));
77  VTK_LEGACY(virtual int GetSingleLevel ());
79 
81 
94  {
98  VERTICAL_DIMENSION_COUNT
99  };
100  vtkSetClampMacro(VerticalDimension, int, 0, 2);
101  vtkGetMacro(VerticalDimension, int);
103 
105 
111  vtkBooleanMacro(SingleMidpointLayer, int);
112  vtkSetMacro(SingleMidpointLayer, int);
113  vtkGetMacro(SingleMidpointLayer, int);
114  vtkSetMacro(MidpointLayerIndex, int);
115  vtkGetMacro(MidpointLayerIndex, int);
116  vtkGetVector2Macro(MidpointLayersRange, int);
117 
118  vtkBooleanMacro(SingleInterfaceLayer, int);
119  vtkSetMacro(SingleInterfaceLayer, int);
120  vtkGetMacro(SingleInterfaceLayer, int);
121  vtkSetMacro(InterfaceLayerIndex, int);
122  vtkGetMacro(InterfaceLayerIndex, int);
123  vtkGetVector2Macro(InterfaceLayersRange, int);
125 
127 
131  int GetNumberOfPointArrays();
132  const char* GetPointArrayName(int index);
133  int GetPointArrayStatus(const char* name);
134  void SetPointArrayStatus(const char* name, int status);
135  void DisableAllPointArrays();
136  void EnableAllPointArrays();
138 
139 
141 
148  VTK_LEGACY(void SetCellLayerRight(int));
149  VTK_LEGACY(int GetCellLayerRight());
151 
152 protected:
155 
158 
161 
164 
170  bool GetPartitioning(
171  int piece, int numPieces,int numCellLevels, int numCellsPerLevel,
172  int & beginCellLevel, int & endCellLevel, int & beginCell, int & endCell);
173 
174  void BuildVarArray();
175  static void SelectionCallback(vtkObject* caller, unsigned long eid,
176  void* clientdata, void* calldata);
177 
178 
179 private:
180  vtkNetCDFCAMReader(const vtkNetCDFCAMReader&) VTK_DELETE_FUNCTION;
181  void operator=(const vtkNetCDFCAMReader&) VTK_DELETE_FUNCTION;
182 
184 
188  char* FileName;
189  char* CurrentFileName;
190  vtkSetStringMacro(CurrentFileName);
192 
194 
197  char* ConnectivityFileName;
198  char* CurrentConnectivityFileName;
199  vtkSetStringMacro(CurrentConnectivityFileName);
201 
202  int VerticalDimension;
203  double * TimeSteps;
204  long NumberOfTimeSteps;
205  vtkDataArraySelection* PointDataArraySelection;
206  vtkCallbackCommand* SelectionObserver;
207 
208  int SingleMidpointLayer;
209  int MidpointLayerIndex;
210  int MidpointLayersRange[2];
211 
212  int SingleInterfaceLayer;
213  int InterfaceLayerIndex;
214  int InterfaceLayersRange[2];
215 
216 
218 
222  NcFile* PointsFile;
223  NcFile* ConnectivityFile;
224 };
226 
227 #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:59
Store vtkAlgorithm input/output information.
static vtkUnstructuredGridAlgorithm * New()
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Read unstructured NetCDF CAM files.
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 for a vtkSource.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
Superclass for algorithms that produce only unstructured grid as output.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
VerticalDimension
Set whether to read a single layer, midpoint layers or interface layers.
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.