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 vtkCallbackCommand;
39 
40 class VTKIONETCDF_EXPORT vtkNetCDFCAMReader : public vtkUnstructuredGridAlgorithm
41 {
42 public:
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
53  static int CanReadFile(const char* fileName);
54 
55  void SetFileName(const char* fileName);
56  vtkGetStringMacro(FileName);
57 
58  void SetConnectivityFileName(const char* fileName);
59  vtkGetStringMacro(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 
113  const char* GetPointArrayName(int index);
114  int GetPointArrayStatus(const char* name);
115  void SetPointArrayStatus(const char* name, int status);
119 
120 protected:
123 
125  vtkInformationVector*) override;
126 
128  vtkInformationVector *) override;
129 
131  vtkInformationVector *) override;
132 
139  size_t piece, size_t numPieces,size_t numCellLevels, size_t numCellsPerLevel,
140  size_t & beginCellLevel, size_t & endCellLevel, size_t & beginCell, size_t & endCell);
141 
143  static void SelectionCallback(vtkObject* caller, unsigned long eid,
144  void* clientdata, void* calldata);
145 
146 
147 private:
148  vtkNetCDFCAMReader(const vtkNetCDFCAMReader&) = delete;
149  void operator=(const vtkNetCDFCAMReader&) = delete;
150 
152 
156  char* FileName;
157  char* CurrentFileName;
158  vtkSetStringMacro(CurrentFileName);
160 
162 
165  char* ConnectivityFileName;
166  char* CurrentConnectivityFileName;
167  vtkSetStringMacro(CurrentConnectivityFileName);
169 
170  int VerticalDimension;
171  double * TimeSteps;
172  size_t NumberOfTimeSteps;
173  vtkDataArraySelection* PointDataArraySelection;
174  vtkCallbackCommand* SelectionObserver;
175 
176  vtkTypeBool SingleMidpointLayer;
177  int MidpointLayerIndex;
178  int MidpointLayersRange[2];
179 
180  vtkTypeBool SingleInterfaceLayer;
181  int InterfaceLayerIndex;
182  int InterfaceLayersRange[2];
183 
184  class Internal;
185  Internal *Internals;
186 };
187 
188 #endif
vtkNetCDFCAMReader::GetPointArrayName
const char * GetPointArrayName(int index)
vtkNetCDFCAMReader
Read unstructured NetCDF CAM files.
Definition: vtkNetCDFCAMReader.h:41
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkNetCDFCAMReader::VERTICAL_DIMENSION_INTERFACE_LAYERS
@ VERTICAL_DIMENSION_INTERFACE_LAYERS
Definition: vtkNetCDFCAMReader.h:78
vtkNetCDFCAMReader::GetPartitioning
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.
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkNetCDFCAMReader::BuildVarArray
void BuildVarArray()
vtkNetCDFCAMReader::New
static vtkNetCDFCAMReader * New()
vtkNetCDFCAMReader::EnableAllPointArrays
void EnableAllPointArrays()
vtkDataArraySelection
Store on/off settings for data arrays for a vtkSource.
Definition: vtkDataArraySelection.h:38
vtkNetCDFCAMReader::VERTICAL_DIMENSION_SINGLE_LAYER
@ VERTICAL_DIMENSION_SINGLE_LAYER
Definition: vtkNetCDFCAMReader.h:76
vtkNetCDFCAMReader::SetConnectivityFileName
void SetConnectivityFileName(const char *fileName)
vtkNetCDFCAMReader::SelectionCallback
static void SelectionCallback(vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)
vtkNetCDFCAMReader::RequestUpdateExtent
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkNetCDFCAMReader::CanReadFile
static int CanReadFile(const char *fileName)
Returns 1 if this file can be read and 0 if the file cannot be read.
vtkNetCDFCAMReader::GetNumberOfPointArrays
int GetNumberOfPointArrays()
The following methods allow selective reading of variables.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkNetCDFCAMReader::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkNetCDFCAMReader::VerticalDimension
VerticalDimension
Set whether to read a single layer, midpoint layers or interface layers.
Definition: vtkNetCDFCAMReader.h:75
vtkNetCDFCAMReader::DisableAllPointArrays
void DisableAllPointArrays()
vtkX3D::name
@ name
Definition: vtkX3D.h:219
vtkNetCDFCAMReader::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkNetCDFCAMReader::SetFileName
void SetFileName(const char *fileName)
vtkNetCDFCAMReader::VERTICAL_DIMENSION_MIDPOINT_LAYERS
@ VERTICAL_DIMENSION_MIDPOINT_LAYERS
Definition: vtkNetCDFCAMReader.h:77
vtkCallbackCommand
supports function callbacks
Definition: vtkCallbackCommand.h:51
vtkUnstructuredGridAlgorithm.h
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:41
vtkNetCDFCAMReader::GetPointArrayStatus
int GetPointArrayStatus(const char *name)
vtkNetCDFCAMReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkNetCDFCAMReader::vtkNetCDFCAMReader
vtkNetCDFCAMReader()
vtkNetCDFCAMReader::~vtkNetCDFCAMReader
~vtkNetCDFCAMReader() override
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkNetCDFCAMReader::SetPointArrayStatus
void SetPointArrayStatus(const char *name, int status)