00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00028 #ifndef __vtkVPICReader_h
00029 #define __vtkVPICReader_h
00030
00031 #include "vtkImageAlgorithm.h"
00032
00033
00034 class vtkCallbackCommand;
00035 class vtkDataArraySelection;
00036 class vtkFloatArray;
00037 class vtkStdString;
00038 class vtkMultiProcessController;
00039 class vtkInformation;
00040
00041 class VPICDataSet;
00042
00043 class VTK_PARALLEL_EXPORT vtkVPICReader : public vtkImageAlgorithm
00044 {
00045 public:
00046 static vtkVPICReader *New();
00047 vtkTypeRevisionMacro(vtkVPICReader,vtkImageAlgorithm);
00048 void PrintSelf(ostream& os, vtkIndent indent);
00049
00051
00052 vtkSetStringMacro(FileName);
00053 vtkGetStringMacro(FileName);
00055
00057
00058 vtkSetVector3Macro(Stride, int);
00059 vtkGetVector3Macro(Stride, int);
00061
00063
00064 vtkSetVector2Macro(XExtent, int);
00065 vtkSetVector2Macro(YExtent, int);
00066 vtkSetVector2Macro(ZExtent, int);
00068
00069
00070 vtkGetVector2Macro(XLayout, int);
00071 vtkGetVector2Macro(YLayout, int);
00072 vtkGetVector2Macro(ZLayout, int);
00073
00075
00076 vtkImageData *GetOutput();
00077 vtkImageData *GetOutput(int index);
00079
00081
00084 int GetNumberOfPointArrays();
00085 const char* GetPointArrayName(int index);
00086 int GetPointArrayStatus(const char* name);
00087 void SetPointArrayStatus(const char* name, int status);
00088 void DisableAllPointArrays();
00089 void EnableAllPointArrays();
00091
00092 protected:
00093 vtkVPICReader();
00094 ~vtkVPICReader();
00095
00096 char *FileName;
00097
00098 int Rank;
00099 int TotalRank;
00100 int UsedRank;
00101
00102 VPICDataSet* vpicData;
00103
00104 int NumberOfPieces;
00105 vtkIdType NumberOfNodes;
00106 vtkIdType NumberOfCells;
00107 vtkIdType NumberOfTuples;
00108
00109 int WholeExtent[6];
00110 int SubExtent[6];
00111 int Dimension[3];
00112 int SubDimension[3];
00113 int XLayout[2];
00114 int YLayout[2];
00115 int ZLayout[2];
00116
00117 int NumberOfVariables;
00118 vtkStdString* VariableName;
00119 int* VariableStruct;
00120
00121 int NumberOfTimeSteps;
00122 double* TimeSteps;
00123
00124 int Stride[3];
00125 int XExtent[2];
00126 int YExtent[2];
00127 int ZExtent[2];
00128
00129 vtkFloatArray** data;
00130
00131
00132 vtkMultiProcessController * MPIController;
00133
00134
00135 vtkDataArraySelection* PointDataArraySelection;
00136
00137
00138 vtkCallbackCommand* SelectionObserver;
00139
00140 int RequestData(vtkInformation *, vtkInformationVector **,
00141 vtkInformationVector *);
00142 int RequestInformation(vtkInformation *, vtkInformationVector **inVector,
00143 vtkInformationVector *);
00144
00145 void LoadVariableData(int var, int timeStep);
00146
00147 static void SelectionCallback(vtkObject* caller, unsigned long eid,
00148 void* clientdata, void* calldata);
00149 static void EventCallback(vtkObject* caller, unsigned long eid,
00150 void* clientdata, void* calldata);
00151
00152
00153 private:
00154 vtkVPICReader(const vtkVPICReader&);
00155 void operator=(const vtkVPICReader&);
00156 };
00157
00158 #endif
00159
00160