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