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 =========================================================================*/
31 #ifndef vtkTemporalFractal_h
32 #define vtkTemporalFractal_h
33 
34 #include "vtkFiltersHybridModule.h" // For export macro
35 #include "vtkAlgorithm.h"
36 #include "vtkSmartPointer.h" //for ivars
37 
39 class vtkDataSet;
41 class vtkIntArray;
42 class vtkRectilinearGrid;
43 class vtkUniformGrid;
44 class TemporalFractalOutputUtil;
45 
46 class VTKFILTERSHYBRID_EXPORT vtkTemporalFractal: public vtkAlgorithm
47 {
48 public:
49  static vtkTemporalFractal *New();
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
54 
59  vtkSetMacro(FractalValue, float);
60  vtkGetMacro(FractalValue, float);
62 
64 
69  vtkSetMacro(MaximumLevel, int);
70  vtkGetMacro(MaximumLevel, int);
72 
74 
77  vtkSetMacro(Dimensions, int);
78  vtkGetMacro(Dimensions, int);
80 
82 
85  vtkSetMacro(GhostLevels, int);
86  vtkGetMacro(GhostLevels, int);
87  vtkBooleanMacro(GhostLevels, int);
89 
91 
95  vtkSetMacro(GenerateRectilinearGrids, int);
96  vtkGetMacro(GenerateRectilinearGrids, int);
97  vtkBooleanMacro(GenerateRectilinearGrids, int);
99 
101 
105  vtkSetMacro(DiscreteTimeSteps, int);
106  vtkGetMacro(DiscreteTimeSteps, int);
107  vtkBooleanMacro(DiscreteTimeSteps, int);
109 
111 
114  vtkSetMacro(TwoDimensional, int);
115  vtkGetMacro(TwoDimensional, int);
116  vtkBooleanMacro(TwoDimensional, int);
118 
120 
124  vtkSetMacro(Asymetric,int);
125  vtkGetMacro(Asymetric,int);
127 
129 
132  vtkSetMacro(AdaptiveSubdivision, int);
133  vtkGetMacro(AdaptiveSubdivision, int);
134  vtkBooleanMacro(AdaptiveSubdivision, int);
136 
137 
138 protected:
141 
142  virtual int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info);
143 
145  int EndBlock;
147 
151  virtual int ProcessRequest(vtkInformation* request,
152  vtkInformationVector** inputVector,
153  vtkInformationVector* outputVector);
154 
159  virtual int RequestDataObject(vtkInformation*,
162 
167  virtual int RequestInformation(vtkInformation *request,
168  vtkInformationVector **inputVector,
169  vtkInformationVector *outputVector);
170 
172 
176  virtual int RequestData(vtkInformation *request,
177  vtkInformationVector **inputVector,
178  vtkInformationVector *outputVector);
179  virtual int RequestOneTimeStep(vtkCompositeDataSet *output,
180  vtkInformation *request,
181  vtkInformationVector **inputVector,
182  vtkInformationVector *outputVector);
184 
185  void Traverse(int &blockId, int level, vtkDataObject* output,
186  int x0,int x1, int y0,int y1, int z0,int z1,
187  int onFace[6]);
188 
189  int LineTest2(float x0, float y0, float z0,
190  float x1, float y1, float z1,
191  double bds[6]);
192  int LineTest(float x0, float y0, float z0,
193  float x1, float y1, float z1,
194  double bds[6], int level, int target);
195 
196  void SetBlockInfo(vtkUniformGrid *grid, int level, int* ext,int onFace[6]);
197  void SetRBlockInfo(vtkRectilinearGrid *grid, int level, int* ext,
198  int onFace[6]);
199 
200  void AddVectorArray(vtkHierarchicalBoxDataSet *output);
201  void AddTestArray(vtkHierarchicalBoxDataSet *output);
202  void AddFractalArray(vtkCompositeDataSet* output);
203  void AddBlockIdArray(vtkHierarchicalBoxDataSet *output);
204  void AddDepthArray(vtkHierarchicalBoxDataSet *output);
205 
206  void AddGhostLevelArray(vtkDataSet *grid,
207  int dim[3],
208  int onFace[6]);
209 
210  int MandelbrotTest(double x, double y);
211  int TwoDTest(double bds[6], int level, int target);
212 
213  void CellExtentToBounds(int level,
214  int ext[6],
215  double bds[6]);
216 
217  void ExecuteRectilinearMandelbrot(vtkRectilinearGrid *grid,
218  double *ptr);
219  double EvaluateSet(double p[4]);
220  void GetContinuousIncrements(int extent[6],
221  vtkIdType &incX,
222  vtkIdType &incY,
223  vtkIdType &incZ);
224 
225  // Dimensions:
226  // Specify blocks relative to this top level block.
227  // For now this has to be set before the blocks are defined.
228  vtkSetVector3Macro(TopLevelSpacing, double);
229  vtkGetVector3Macro(TopLevelSpacing, double);
230  vtkSetVector3Macro(TopLevelOrigin, double);
231  vtkGetVector3Macro(TopLevelOrigin, double);
232 
233  void InternalImageDataCopy(vtkTemporalFractal *src);
234 
243 
244  // New method of specifing blocks.
245  double TopLevelSpacing[3];
246  double TopLevelOrigin[3];
247 
249 
250  double CurrentTime;
251 
254 
255 private:
256  vtkTemporalFractal(const vtkTemporalFractal&) VTK_DELETE_FUNCTION;
257  void operator=(const vtkTemporalFractal&) VTK_DELETE_FUNCTION;
258 };
259 
260 
261 #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:62
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
Backwards compatibility class.
int vtkIdType
Definition: vtkType.h:287
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:45
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:59
abstract superclass for composite (multi-block or AMR) datasets
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
image data with blanking
vtkSmartPointer< TemporalFractalOutputUtil > OutputUtil
A source to test AMR data object.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
general representation of visualization data
Definition: vtkDataObject.h:64