00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00025 #ifndef __vtkNetCDFPOPReader_h
00026 #define __vtkNetCDFPOPReader_h
00027
00028 #include "vtkRectilinearGridAlgorithm.h"
00029 #include "vtkSmartPointer.h"
00030
00031 class vtkDataArraySelection;
00032 class vtkCallbackCommand;
00033
00034
00035
00036 #define NCDFPOP_MAX_ARRAYS 100
00037 #define NCDFPOP_MAX_NAMELEN 100
00038
00039 class VTK_IO_EXPORT vtkNetCDFPOPReader : public vtkRectilinearGridAlgorithm
00040 {
00041 public:
00042 vtkTypeMacro(vtkNetCDFPOPReader,vtkRectilinearGridAlgorithm);
00043 static vtkNetCDFPOPReader *New();
00044 void PrintSelf(ostream& os, vtkIndent indent);
00045
00047
00048 vtkSetStringMacro(FileName);
00049 vtkGetStringMacro(FileName);
00051
00053
00054 vtkSetVector3Macro(Stride, int);
00055 vtkGetVector3Macro(Stride, int);
00057
00059
00060 virtual int GetNumberOfVariableArrays();
00061 virtual const char *GetVariableArrayName(int idx);
00062 virtual int GetVariableArrayStatus(const char *name);
00063 virtual void SetVariableArrayStatus(const char *name, int status);
00065
00066 protected:
00067 vtkNetCDFPOPReader();
00068 ~vtkNetCDFPOPReader();
00069
00070 vtkSmartPointer<vtkDataArraySelection> VariableArraySelection;
00071
00072
00073 int RequestData(vtkInformation*,vtkInformationVector**,
00074 vtkInformationVector*);
00075 virtual int RequestInformation(vtkInformation* request,
00076 vtkInformationVector** inputVector,
00077 vtkInformationVector* outputVector);
00078
00079 static void SelectionModifiedCallback(vtkObject *caller, unsigned long eid,
00080 void *clientdata, void *calldata);
00081
00082 static void EventCallback(vtkObject* caller, unsigned long eid,
00083 void* clientdata, void* calldata);
00084
00085
00086 char VariableArrayInfo[NCDFPOP_MAX_ARRAYS][NCDFPOP_MAX_NAMELEN];
00087
00088 char VariableName[NCDFPOP_MAX_ARRAYS][NCDFPOP_MAX_NAMELEN];
00089
00090 int Draw[NCDFPOP_MAX_ARRAYS];
00091
00092 vtkCallbackCommand* SelectionObserver;
00093
00094 char *FileName;
00095
00096 int NCDFFD;
00097 int NVarsp;
00098 int NVarspw;
00099
00100 int Stride[3];
00101
00102 private:
00103 vtkNetCDFPOPReader(const vtkNetCDFPOPReader&);
00104 void operator=(const vtkNetCDFPOPReader&);
00105 };
00106 #endif