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