VTK
vtkTemporalFractal.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkTemporalFractal.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
30 #ifndef vtkTemporalFractal_h
31 #define vtkTemporalFractal_h
32 
33 #include "vtkFiltersHybridModule.h" // For export macro
34 #include "vtkAlgorithm.h"
35 #include "vtkSmartPointer.h" //for ivars
36 
38 class vtkDataSet;
40 class vtkIntArray;
41 class vtkRectilinearGrid;
42 class vtkUniformGrid;
43 class TemporalFractalOutputUtil;
44 
46 {
47 public:
48  static vtkTemporalFractal *New();
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
53 
55  vtkSetMacro(FractalValue, float);
56  vtkGetMacro(FractalValue, float);
58 
60 
63  vtkSetMacro(MaximumLevel, int);
64  vtkGetMacro(MaximumLevel, int);
66 
68 
69  vtkSetMacro(Dimensions, int);
70  vtkGetMacro(Dimensions, int);
72 
74 
75  vtkSetMacro(GhostLevels, int);
76  vtkGetMacro(GhostLevels, int);
77  vtkBooleanMacro(GhostLevels, int);
79 
81 
83  vtkSetMacro(GenerateRectilinearGrids, int);
84  vtkGetMacro(GenerateRectilinearGrids, int);
85  vtkBooleanMacro(GenerateRectilinearGrids, int);
87 
89 
91  vtkSetMacro(DiscreteTimeSteps, int);
92  vtkGetMacro(DiscreteTimeSteps, int);
93  vtkBooleanMacro(DiscreteTimeSteps, int);
95 
97 
98  vtkSetMacro(TwoDimensional, int);
99  vtkGetMacro(TwoDimensional, int);
100  vtkBooleanMacro(TwoDimensional, int);
102 
104 
106  vtkSetMacro(Asymetric,int);
107  vtkGetMacro(Asymetric,int);
109 
111 
112  vtkSetMacro(AdaptiveSubdivision, int);
113  vtkGetMacro(AdaptiveSubdivision, int);
114  vtkBooleanMacro(AdaptiveSubdivision, int);
116 
117 
118 protected:
121 
122  virtual int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info);
123 
125  int EndBlock;
127 
129 
130  virtual int ProcessRequest(vtkInformation* request,
131  vtkInformationVector** inputVector,
132  vtkInformationVector* outputVector);
134 
136 
138  virtual int RequestDataObject(vtkInformation*,
142 
144 
146  virtual int RequestInformation(vtkInformation *request,
147  vtkInformationVector **inputVector,
148  vtkInformationVector *outputVector);
150 
152 
154  virtual int RequestData(vtkInformation *request,
155  vtkInformationVector **inputVector,
156  vtkInformationVector *outputVector);
157  virtual int RequestOneTimeStep(vtkCompositeDataSet *output,
158  vtkInformation *request,
159  vtkInformationVector **inputVector,
160  vtkInformationVector *outputVector);
162 
163  void Traverse(int &blockId, int level, vtkDataObject* output,
164  int x0,int x1, int y0,int y1, int z0,int z1,
165  int onFace[6]);
166 
167  int LineTest2(float x0, float y0, float z0,
168  float x1, float y1, float z1,
169  double bds[6]);
170  int LineTest(float x0, float y0, float z0,
171  float x1, float y1, float z1,
172  double bds[6], int level, int target);
173 
174  void SetBlockInfo(vtkUniformGrid *grid, int level, int* ext,int onFace[6]);
175  void SetRBlockInfo(vtkRectilinearGrid *grid, int level, int* ext,
176  int onFace[6]);
177 
178  void AddVectorArray(vtkHierarchicalBoxDataSet *output);
179  void AddTestArray(vtkHierarchicalBoxDataSet *output);
180  void AddFractalArray(vtkCompositeDataSet* output);
181  void AddBlockIdArray(vtkHierarchicalBoxDataSet *output);
182  void AddDepthArray(vtkHierarchicalBoxDataSet *output);
183 
184  void AddGhostLevelArray(vtkDataSet *grid,
185  int dim[3],
186  int onFace[6]);
187 
188  int MandelbrotTest(double x, double y);
189  int TwoDTest(double bds[6], int level, int target);
190 
191  void CellExtentToBounds(int level,
192  int ext[6],
193  double bds[6]);
194 
195  void ExecuteRectilinearMandelbrot(vtkRectilinearGrid *grid,
196  double *ptr);
197  double EvaluateSet(double p[4]);
198  void GetContinuousIncrements(int extent[6],
199  vtkIdType &incX,
200  vtkIdType &incY,
201  vtkIdType &incZ);
202 
203  // Dimensions:
204  // Specify blocks relative to this top level block.
205  // For now this has to be set before the blocks are defined.
206  vtkSetVector3Macro(TopLevelSpacing, double);
207  vtkGetVector3Macro(TopLevelSpacing, double);
208  vtkSetVector3Macro(TopLevelOrigin, double);
209  vtkGetVector3Macro(TopLevelOrigin, double);
210 
211  void InternalImageDataCopy(vtkTemporalFractal *src);
212 
221 
222  // New method of specifing blocks.
223  double TopLevelSpacing[3];
224  double TopLevelOrigin[3];
225 
227 
228  double CurrentTime;
229 
232 
233 private:
234  vtkTemporalFractal(const vtkTemporalFractal&); // Not implemented.
235  void operator=(const vtkTemporalFractal&); // Not implemented.
236 };
237 
238 
239 #endif
a dataset that is topologically regular with variable spacing in the three coordinate directions ...
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Backwards compatibility class.
int vtkIdType
Definition: vtkType.h:275
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:49
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:61
abstract superclass for composite (multi-block or AMR) datasets
virtual int FillOutputPortInformation(int port, vtkInformation *info)
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKFILTERSHYBRID_EXPORT
image data with blanking
vtkSmartPointer< TemporalFractalOutputUtil > OutputUtil
A source to test AMR data object.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
general representation of visualization data
Definition: vtkDataObject.h:64
void PrintSelf(ostream &os, vtkIndent indent)