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 =========================================================================*/
28 #ifndef vtkTemporalFractal_h
29 #define vtkTemporalFractal_h
30 
31 #include "vtkFiltersHybridModule.h" // For export macro
32 #include "vtkAlgorithm.h"
33 #include "vtkSmartPointer.h" //for ivars
34 
36 class vtkDataSet;
38 class vtkIntArray;
39 class vtkRectilinearGrid;
40 class vtkUniformGrid;
41 class TemporalFractalOutputUtil;
42 
43 class VTKFILTERSHYBRID_EXPORT vtkTemporalFractal: public vtkAlgorithm
44 {
45 public:
46  static vtkTemporalFractal *New();
48  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
49 
51 
56  vtkSetMacro(FractalValue, float);
57  vtkGetMacro(FractalValue, float);
59 
61 
66  vtkSetMacro(MaximumLevel, int);
67  vtkGetMacro(MaximumLevel, int);
69 
71 
74  vtkSetMacro(Dimensions, int);
75  vtkGetMacro(Dimensions, int);
77 
79 
82  vtkSetMacro(GhostLevels, int);
83  vtkGetMacro(GhostLevels, int);
84  vtkBooleanMacro(GhostLevels, int);
86 
88 
92  vtkSetMacro(GenerateRectilinearGrids, int);
93  vtkGetMacro(GenerateRectilinearGrids, int);
94  vtkBooleanMacro(GenerateRectilinearGrids, int);
96 
98 
102  vtkSetMacro(DiscreteTimeSteps, int);
103  vtkGetMacro(DiscreteTimeSteps, int);
104  vtkBooleanMacro(DiscreteTimeSteps, int);
106 
108 
111  vtkSetMacro(TwoDimensional, int);
112  vtkGetMacro(TwoDimensional, int);
113  vtkBooleanMacro(TwoDimensional, int);
115 
117 
121  vtkSetMacro(Asymetric,int);
122  vtkGetMacro(Asymetric,int);
124 
126 
129  vtkSetMacro(AdaptiveSubdivision, int);
130  vtkGetMacro(AdaptiveSubdivision, int);
131  vtkBooleanMacro(AdaptiveSubdivision, int);
133 
134 
135 protected:
137  ~vtkTemporalFractal() VTK_OVERRIDE;
138 
139  int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info) VTK_OVERRIDE;
140 
141  int StartBlock;
142  int EndBlock;
143  int BlockCount;
144 
148  int ProcessRequest(vtkInformation* request,
149  vtkInformationVector** inputVector,
150  vtkInformationVector* outputVector) VTK_OVERRIDE;
151 
156  virtual int RequestDataObject(vtkInformation*,
159 
164  virtual int RequestInformation(vtkInformation *request,
165  vtkInformationVector **inputVector,
166  vtkInformationVector *outputVector);
167 
169 
173  virtual int RequestData(vtkInformation *request,
174  vtkInformationVector **inputVector,
175  vtkInformationVector *outputVector);
176  virtual int RequestOneTimeStep(vtkCompositeDataSet *output,
177  vtkInformation *request,
178  vtkInformationVector **inputVector,
179  vtkInformationVector *outputVector);
181 
182  void Traverse(int &blockId, int level, vtkDataObject* output,
183  int x0,int x1, int y0,int y1, int z0,int z1,
184  int onFace[6]);
185 
186  int LineTest2(float x0, float y0, float z0,
187  float x1, float y1, float z1,
188  double bds[6]);
189  int LineTest(float x0, float y0, float z0,
190  float x1, float y1, float z1,
191  double bds[6], int level, int target);
192 
193  void SetBlockInfo(vtkUniformGrid *grid, int level, int* ext,int onFace[6]);
194  void SetRBlockInfo(vtkRectilinearGrid *grid, int level, int* ext,
195  int onFace[6]);
196 
197  void AddVectorArray(vtkHierarchicalBoxDataSet *output);
198  void AddTestArray(vtkHierarchicalBoxDataSet *output);
199  void AddFractalArray(vtkCompositeDataSet* output);
200  void AddBlockIdArray(vtkHierarchicalBoxDataSet *output);
201  void AddDepthArray(vtkHierarchicalBoxDataSet *output);
202 
203  void AddGhostLevelArray(vtkDataSet *grid,
204  int dim[3],
205  int onFace[6]);
206 
207  int MandelbrotTest(double x, double y);
208  int TwoDTest(double bds[6], int level, int target);
209 
210  void CellExtentToBounds(int level,
211  int ext[6],
212  double bds[6]);
213 
214  void ExecuteRectilinearMandelbrot(vtkRectilinearGrid *grid,
215  double *ptr);
216  double EvaluateSet(double p[4]);
217  void GetContinuousIncrements(int extent[6],
218  vtkIdType &incX,
219  vtkIdType &incY,
220  vtkIdType &incZ);
221 
222  // Dimensions:
223  // Specify blocks relative to this top level block.
224  // For now this has to be set before the blocks are defined.
225  vtkSetVector3Macro(TopLevelSpacing, double);
226  vtkGetVector3Macro(TopLevelSpacing, double);
227  vtkSetVector3Macro(TopLevelOrigin, double);
228  vtkGetVector3Macro(TopLevelOrigin, double);
229 
230  void InternalImageDataCopy(vtkTemporalFractal *src);
231 
232  int Asymetric;
233  int MaximumLevel;
234  int Dimensions;
235  float FractalValue;
236  int GhostLevels;
237  vtkIntArray *Levels;
238  int TwoDimensional;
239  int DiscreteTimeSteps;
240 
241  // New method of specifing blocks.
242  double TopLevelSpacing[3];
243  double TopLevelOrigin[3];
244 
245  int GenerateRectilinearGrids;
246 
247  double CurrentTime;
248 
249  int AdaptiveSubdivision;
250  vtkSmartPointer<TemporalFractalOutputUtil> OutputUtil;
251 
252 private:
253  vtkTemporalFractal(const vtkTemporalFractal&) VTK_DELETE_FUNCTION;
254  void operator=(const vtkTemporalFractal&) VTK_DELETE_FUNCTION;
255 };
256 
257 
258 #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:56
Backwards compatibility class.
Hold a reference to a vtkObjectBase instance.
int vtkIdType
Definition: vtkType.h:345
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:39
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:53
abstract superclass for composite (multi-block or AMR) datasets
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
image data with blanking
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:58