VTK  9.3.20240424
vtkTemporalFractal.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright (c) Kitware, Inc.
3// SPDX-License-Identifier: BSD-3-Clause
21#ifndef vtkTemporalFractal_h
22#define vtkTemporalFractal_h
23
24#include "vtkAlgorithm.h"
25#include "vtkFiltersHybridModule.h" // For export macro
26#include "vtkSmartPointer.h" //for ivars
27
28VTK_ABI_NAMESPACE_BEGIN
30class vtkDataSet;
32class vtkIntArray;
34class vtkUniformGrid;
35class TemporalFractalOutputUtil;
36
37class VTKFILTERSHYBRID_EXPORT vtkTemporalFractal : public vtkAlgorithm
38{
39public:
41
46 void PrintSelf(ostream& os, vtkIndent indent) override;
48
50
54 vtkSetMacro(FractalValue, float);
55 vtkGetMacro(FractalValue, float);
57
59
64 vtkSetMacro(MaximumLevel, int);
65 vtkGetMacro(MaximumLevel, int);
67
69
72 vtkSetMacro(Dimensions, int);
73 vtkGetMacro(Dimensions, int);
75
77
80 vtkSetMacro(GhostLevels, vtkTypeBool);
81 vtkGetMacro(GhostLevels, vtkTypeBool);
82 vtkBooleanMacro(GhostLevels, vtkTypeBool);
84
86
90 vtkSetMacro(GenerateRectilinearGrids, vtkTypeBool);
91 vtkGetMacro(GenerateRectilinearGrids, vtkTypeBool);
92 vtkBooleanMacro(GenerateRectilinearGrids, vtkTypeBool);
94
96
100 vtkSetMacro(DiscreteTimeSteps, vtkTypeBool);
101 vtkGetMacro(DiscreteTimeSteps, vtkTypeBool);
102 vtkBooleanMacro(DiscreteTimeSteps, vtkTypeBool);
104
106
109 vtkSetMacro(TwoDimensional, vtkTypeBool);
110 vtkGetMacro(TwoDimensional, vtkTypeBool);
111 vtkBooleanMacro(TwoDimensional, vtkTypeBool);
113
115
119 vtkSetMacro(Asymmetric, int);
120 vtkGetMacro(Asymmetric, int);
122
124
127 vtkSetMacro(AdaptiveSubdivision, vtkTypeBool);
128 vtkGetMacro(AdaptiveSubdivision, vtkTypeBool);
129 vtkBooleanMacro(AdaptiveSubdivision, vtkTypeBool);
131
132protected:
135
136 int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info) override;
137
141
146 vtkInformationVector* outputVector) override;
147
153
158 virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
159 vtkInformationVector* outputVector);
160
162
166 virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
167 vtkInformationVector* outputVector);
169 vtkInformationVector** inputVector, vtkInformationVector* outputVector);
171
172 void Traverse(int& blockId, int level, vtkDataObject* output, int x0, int x1, int y0, int y1,
173 int z0, int z1, int onFace[6]);
174
175 int LineTest2(float x0, float y0, float z0, float x1, float y1, float z1, double bds[6]);
176 int LineTest(float x0, float y0, float z0, float x1, float y1, float z1, double bds[6], int level,
177 int target);
178
179 void SetBlockInfo(vtkUniformGrid* grid, int level, int* ext, int onFace[6]);
180 void SetRBlockInfo(vtkRectilinearGrid* grid, int level, int* ext, int onFace[6]);
181
187
188 void AddGhostLevelArray(vtkDataSet* grid, int dim[3], int onFace[6]);
189
190 int MandelbrotTest(double x, double y);
191 int TwoDTest(double bds[6], int level, int target);
192
193 void CellExtentToBounds(int level, int ext[6], double bds[6]);
194
196 double EvaluateSet(double p[4]);
197 void GetContinuousIncrements(int extent[6], vtkIdType& incX, vtkIdType& incY, vtkIdType& incZ);
198
199 // Dimensions:
200 // Specify blocks relative to this top level block.
201 // For now this has to be set before the blocks are defined.
202 vtkSetVector3Macro(TopLevelSpacing, double);
203 vtkGetVector3Macro(TopLevelSpacing, double);
204 vtkSetVector3Macro(TopLevelOrigin, double);
205 vtkGetVector3Macro(TopLevelOrigin, double);
206
208
217
218 // New method of specifying blocks.
219 double TopLevelSpacing[3];
220 double TopLevelOrigin[3];
221
223
225
228
229private:
230 vtkTemporalFractal(const vtkTemporalFractal&) = delete;
231 void operator=(const vtkTemporalFractal&) = delete;
232};
233
234VTK_ABI_NAMESPACE_END
235#endif
Superclass for all sources, filters, and sinks in VTK.
abstract superclass for composite (multi-block or AMR) datasets
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
Backwards compatibility class.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
a dataset that is topologically regular with variable spacing in the three coordinate directions
Hold a reference to a vtkObjectBase instance.
A source to test AMR data object.
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
see vtkAlgorithm for details
vtkTypeBool GenerateRectilinearGrids
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
void AddVectorArray(vtkHierarchicalBoxDataSet *output)
void SetBlockInfo(vtkUniformGrid *grid, int level, int *ext, int onFace[6])
vtkSmartPointer< TemporalFractalOutputUtil > OutputUtil
void AddGhostLevelArray(vtkDataSet *grid, int dim[3], int onFace[6])
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, type information, and printing.
vtkTypeBool AdaptiveSubdivision
void AddTestArray(vtkHierarchicalBoxDataSet *output)
void AddBlockIdArray(vtkHierarchicalBoxDataSet *output)
void AddDepthArray(vtkHierarchicalBoxDataSet *output)
virtual int RequestOneTimeStep(vtkCompositeDataSet *output, vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
int LineTest2(float x0, float y0, float z0, float x1, float y1, float z1, double bds[6])
void Traverse(int &blockId, int level, vtkDataObject *output, int x0, int x1, int y0, int y1, int z0, int z1, int onFace[6])
~vtkTemporalFractal() override
void CellExtentToBounds(int level, int ext[6], double bds[6])
void GetContinuousIncrements(int extent[6], vtkIdType &incX, vtkIdType &incY, vtkIdType &incZ)
int LineTest(float x0, float y0, float z0, float x1, float y1, float z1, double bds[6], int level, int target)
static vtkTemporalFractal * New()
Standard methods for instantiation, type information, and printing.
int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation *info) override
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
int MandelbrotTest(double x, double y)
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
double EvaluateSet(double p[4])
void SetRBlockInfo(vtkRectilinearGrid *grid, int level, int *ext, int onFace[6])
int TwoDTest(double bds[6], int level, int target)
void ExecuteRectilinearMandelbrot(vtkRectilinearGrid *grid, double *ptr)
void AddFractalArray(vtkCompositeDataSet *output)
void InternalImageDataCopy(vtkTemporalFractal *src)
image data with blanking
int vtkTypeBool
Definition vtkABI.h:64
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
int vtkIdType
Definition vtkType.h:315