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 =========================================================================*/
29 #ifndef vtkTemporalFractal_h
30 #define vtkTemporalFractal_h
31 
32 #include "vtkFiltersHybridModule.h" // For export macro
33 #include "vtkAlgorithm.h"
34 #include "vtkSmartPointer.h" //for ivars
35 
37 class vtkDataSet;
39 class vtkIntArray;
40 class vtkRectilinearGrid;
41 class vtkUniformGrid;
42 class TemporalFractalOutputUtil;
43 
44 class VTKFILTERSHYBRID_EXPORT vtkTemporalFractal: public vtkAlgorithm
45 {
46 public:
48 
51  static vtkTemporalFractal *New();
53  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
57 
61  vtkSetMacro(FractalValue, float);
62  vtkGetMacro(FractalValue, float);
64 
66 
71  vtkSetMacro(MaximumLevel, int);
72  vtkGetMacro(MaximumLevel, int);
74 
76 
79  vtkSetMacro(Dimensions, int);
80  vtkGetMacro(Dimensions, int);
82 
84 
87  vtkSetMacro(GhostLevels, vtkTypeBool);
88  vtkGetMacro(GhostLevels, vtkTypeBool);
89  vtkBooleanMacro(GhostLevels, vtkTypeBool);
91 
93 
97  vtkSetMacro(GenerateRectilinearGrids, vtkTypeBool);
98  vtkGetMacro(GenerateRectilinearGrids, vtkTypeBool);
99  vtkBooleanMacro(GenerateRectilinearGrids, vtkTypeBool);
101 
103 
107  vtkSetMacro(DiscreteTimeSteps, vtkTypeBool);
108  vtkGetMacro(DiscreteTimeSteps, vtkTypeBool);
109  vtkBooleanMacro(DiscreteTimeSteps, vtkTypeBool);
111 
113 
116  vtkSetMacro(TwoDimensional, vtkTypeBool);
117  vtkGetMacro(TwoDimensional, vtkTypeBool);
118  vtkBooleanMacro(TwoDimensional, vtkTypeBool);
120 
122 
126  vtkSetMacro(Asymmetric,int);
127  vtkGetMacro(Asymmetric,int);
129 
131 
134  vtkSetMacro(AdaptiveSubdivision, vtkTypeBool);
135  vtkGetMacro(AdaptiveSubdivision, vtkTypeBool);
136  vtkBooleanMacro(AdaptiveSubdivision, vtkTypeBool);
138 
139 
140 protected:
142  ~vtkTemporalFractal() override;
143 
144  int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info) override;
145 
147  int EndBlock;
149 
153  int ProcessRequest(vtkInformation* request,
154  vtkInformationVector** inputVector,
155  vtkInformationVector* outputVector) override;
156 
161  virtual int RequestDataObject(vtkInformation*,
164 
169  virtual int RequestInformation(vtkInformation *request,
170  vtkInformationVector **inputVector,
171  vtkInformationVector *outputVector);
172 
174 
178  virtual int RequestData(vtkInformation *request,
179  vtkInformationVector **inputVector,
180  vtkInformationVector *outputVector);
181  virtual int RequestOneTimeStep(vtkCompositeDataSet *output,
182  vtkInformation *request,
183  vtkInformationVector **inputVector,
184  vtkInformationVector *outputVector);
186 
187  void Traverse(int &blockId, int level, vtkDataObject* output,
188  int x0,int x1, int y0,int y1, int z0,int z1,
189  int onFace[6]);
190 
191  int LineTest2(float x0, float y0, float z0,
192  float x1, float y1, float z1,
193  double bds[6]);
194  int LineTest(float x0, float y0, float z0,
195  float x1, float y1, float z1,
196  double bds[6], int level, int target);
197 
198  void SetBlockInfo(vtkUniformGrid *grid, int level, int* ext,int onFace[6]);
199  void SetRBlockInfo(vtkRectilinearGrid *grid, int level, int* ext,
200  int onFace[6]);
201 
202  void AddVectorArray(vtkHierarchicalBoxDataSet *output);
203  void AddTestArray(vtkHierarchicalBoxDataSet *output);
204  void AddFractalArray(vtkCompositeDataSet* output);
205  void AddBlockIdArray(vtkHierarchicalBoxDataSet *output);
206  void AddDepthArray(vtkHierarchicalBoxDataSet *output);
207 
208  void AddGhostLevelArray(vtkDataSet *grid,
209  int dim[3],
210  int onFace[6]);
211 
212  int MandelbrotTest(double x, double y);
213  int TwoDTest(double bds[6], int level, int target);
214 
215  void CellExtentToBounds(int level,
216  int ext[6],
217  double bds[6]);
218 
219  void ExecuteRectilinearMandelbrot(vtkRectilinearGrid *grid,
220  double *ptr);
221  double EvaluateSet(double p[4]);
222  void GetContinuousIncrements(int extent[6],
223  vtkIdType &incX,
224  vtkIdType &incY,
225  vtkIdType &incZ);
226 
227  // Dimensions:
228  // Specify blocks relative to this top level block.
229  // For now this has to be set before the blocks are defined.
230  vtkSetVector3Macro(TopLevelSpacing, double);
231  vtkGetVector3Macro(TopLevelSpacing, double);
232  vtkSetVector3Macro(TopLevelOrigin, double);
233  vtkGetVector3Macro(TopLevelOrigin, double);
234 
235  void InternalImageDataCopy(vtkTemporalFractal *src);
236 
245 
246  // New method of specifying blocks.
247  double TopLevelSpacing[3];
248  double TopLevelOrigin[3];
249 
251 
252  double CurrentTime;
253 
256 
257 private:
258  vtkTemporalFractal(const vtkTemporalFractal&) = delete;
259  void operator=(const vtkTemporalFractal&) = delete;
260 };
261 
262 
263 #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
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:347
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int vtkTypeBool
Definition: vtkABI.h:69
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
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:33
vtkTypeBool AdaptiveSubdivision
image data with blanking
vtkSmartPointer< TemporalFractalOutputUtil > OutputUtil
A source to test AMR data object.
vtkTypeBool DiscreteTimeSteps
vtkTypeBool GenerateRectilinearGrids
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
general representation of visualization data
Definition: vtkDataObject.h:58