VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkVPICReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkVPICReader.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 =========================================================================*/
28 #ifndef __vtkVPICReader_h
29 #define __vtkVPICReader_h
30 
31 #include "vtkIOVPICModule.h" // For export macro
32 #include "vtkImageAlgorithm.h"
33 
34 
35 class vtkCallbackCommand;
37 class vtkFloatArray;
38 class vtkStdString;
40 class vtkInformation;
41 //BTX
42 class VPICDataSet;
43 class GridExchange;
44 //ETX
46 {
47 public:
48  static vtkVPICReader *New();
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
53 
54  vtkSetStringMacro(FileName);
55  vtkGetStringMacro(FileName);
57 
59 
60  vtkSetVector3Macro(Stride, int);
61  vtkGetVector3Macro(Stride, int);
63 
65 
66  vtkSetVector2Macro(XExtent, int);
67  vtkSetVector2Macro(YExtent, int);
68  vtkSetVector2Macro(ZExtent, int);
70 
71  // Get the full layout size in files for setting the range in GUI
72  vtkGetVector2Macro(XLayout, int);
73  vtkGetVector2Macro(YLayout, int);
74  vtkGetVector2Macro(ZLayout, int);
75 
77 
81 
83 
86  int GetNumberOfPointArrays();
87  const char* GetPointArrayName(int index);
88  int GetPointArrayStatus(const char* name);
89  void SetPointArrayStatus(const char* name, int status);
90  void DisableAllPointArrays();
91  void EnableAllPointArrays();
93 
94 protected:
95  vtkVPICReader();
96  ~vtkVPICReader();
97 
98  char *FileName; // First field part file giving path
99 
100  int Rank; // Number of this processor
101  int TotalRank; // Number of processors
102  int UsedRank; // Number of processors used in display
103 
104  VPICDataSet* vpicData; // Data structure controlling access
105  GridExchange* exchanger; // Exchange ghost cells between procs
106 
107  int NumberOfPieces; // Number of files in dataset
108  vtkIdType NumberOfNodes; // Number of points in grid
109  vtkIdType NumberOfCells; // Number of cells in grid
110  vtkIdType NumberOfTuples; // Number of tuples in sub extent
111 
112  int WholeExtent[6]; // Problem image extent
113  int SubExtent[6]; // Processor problem extent
114  int Dimension[3]; // Size of image
115  int SubDimension[3]; // Size of subextent of image
116  int XLayout[2]; // Extent in complete files
117  int YLayout[2]; // Extent in complete files
118  int ZLayout[2]; // Extent in complete files
119 
120  int NumberOfVariables; // Number of variables to display
121  vtkStdString* VariableName; // Names of each variable
122  int* VariableStruct; // Scalar, vector or tensor
123 
124  int NumberOfTimeSteps; // Temporal domain
125  double* TimeSteps; // Times available for request
126  int CurrentTimeStep; // Time currently displayed
127 
128  int Stride[3]; // Stride over actual data
129  int XExtent[2]; // Subview extent in files
130  int YExtent[2]; // Subview extent in files
131  int ZExtent[2]; // Subview extent in files
132 
133  vtkFloatArray** data; // Actual data arrays
134  int* dataLoaded; // Data is loaded for current time
135 
136  int Start[3]; // Start offset for processor w ghosts
137  int GhostDimension[3]; // Dimension including ghosts on proc
138  int NumberOfGhostTuples; // Total ghost cells per component
139  int ghostLevel0; // Left plane number of ghosts
140  int ghostLevel1; // Right plane number of ghosts
141 
142  // Controls initializing and querrying MPI
144 
145  // Selected field of interest
147 
148  // Observer to modify this object when array selections are modified
150 
155 
156  void LoadVariableData(int var, int timeStep);
157  void LoadComponent(
158  float* varData,
159  float* block,
160  int comp,
161  int numberOfComponents);
162 
163  static void SelectionCallback(vtkObject* caller, unsigned long eid,
164  void* clientdata, void* calldata);
165  static void EventCallback(vtkObject* caller, unsigned long eid,
166  void* clientdata, void* calldata);
167 
168 
169 private:
170  vtkVPICReader(const vtkVPICReader&); // Not implemented.
171  void operator=(const vtkVPICReader&); // Not implemented.
172 };
173 
174 #endif
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkFloatArray ** data
GLuint index
Definition: vtkgl.h:11983
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:45
double * TimeSteps
int vtkIdType
Definition: vtkType.h:268
vtkCallbackCommand * SelectionObserver
vtkImageData * GetOutput()
class for reading VPIC data files
Definition: vtkVPICReader.h:45
GridExchange * exchanger
vtkDataArraySelection * PointDataArraySelection
#define VTKIOVPIC_EXPORT
vtkStdString * VariableName
supports function callbacks
GLuint const GLchar * name
Definition: vtkgl.h:11983
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store on/off settings for data arrays for a vtkSource.
vtkIdType NumberOfCells
int * VariableStruct
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent)
static vtkAlgorithm * New()
vtkIdType NumberOfTuples
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
VPICDataSet * vpicData
vtkMultiProcessController * MPIController
vtkIdType NumberOfNodes
Multiprocessing communication superclass.