VTK: Filters/Hybrid/vtkTemporalFractal.h Source File

| VTK 9.3.1

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
28 VTK_ABI_NAMESPACE_BEGIN
29 class vtkCompositeDataSet;
30 class vtkDataSet;
31 class vtkHierarchicalBoxDataSet;
32 class vtkIntArray;
33 class vtkRectilinearGrid;
34 class vtkUniformGrid;
35 class TemporalFractalOutputUtil;
36
37 class VTKFILTERSHYBRID_EXPORT vtkTemporalFractal : public vtkAlgorithm
38 {
39 public:
41
44 static vtkTemporalFractal* New();
45 vtkTypeMacro(vtkTemporalFractal, vtkAlgorithm);
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
132 protected:
133 vtkTemporalFractal();
134 ~vtkTemporalFractal() override;
135
136 int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info) override;
137
138 int StartBlock;
139 int EndBlock;
140 int BlockCount;
141
145 vtkTypeBool ProcessRequest(vtkInformation* request, vtkInformationVector** inputVector,
146 vtkInformationVector* outputVector) override;
147
152 virtual int RequestDataObject(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
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);
168 virtual int RequestOneTimeStep(vtkCompositeDataSet* output, vtkInformation* request,
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
182 void AddVectorArray(vtkHierarchicalBoxDataSet* output);
183 void AddTestArray(vtkHierarchicalBoxDataSet* output);
184 void AddFractalArray(vtkCompositeDataSet* output);
185 void AddBlockIdArray(vtkHierarchicalBoxDataSet* output);
186 void AddDepthArray(vtkHierarchicalBoxDataSet* output);
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
195 void ExecuteRectilinearMandelbrot(vtkRectilinearGrid* grid, double* ptr);
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
207 void InternalImageDataCopy(vtkTemporalFractal* src);
208
209 int Asymmetric;
210 int MaximumLevel;
211 int Dimensions;
212 float FractalValue;
213 vtkTypeBool GhostLevels;
214 vtkIntArray* Levels;
215 vtkTypeBool TwoDimensional;
216 vtkTypeBool DiscreteTimeSteps;
217
218 // New method of specifying blocks.
219 double TopLevelSpacing[3];
220 double TopLevelOrigin[3];
221
222 vtkTypeBool GenerateRectilinearGrids;
223
224 double CurrentTime;
225
226 vtkTypeBool AdaptiveSubdivision;
227 vtkSmartPointer<TemporalFractalOutputUtil> OutputUtil;
228
229 private:
230 vtkTemporalFractal(const vtkTemporalFractal&) = delete;
231 void operator=(const vtkTemporalFractal&) = delete;
232 };
233
234 VTK_ABI_NAMESPACE_END
235 #endif
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:61
vtkCompositeDataSet
abstract superclass for composite (multi-block or AMR) datasets
Definition: vtkCompositeDataSet.h:51
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkHierarchicalBoxDataSet
Backwards compatibility class.
Definition: vtkHierarchicalBoxDataSet.h:28
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkIntArray
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:44
vtkRectilinearGrid
a dataset that is topologically regular with variable spacing in the three coordinate directions
Definition: vtkRectilinearGrid.h:56
vtkSmartPointer< TemporalFractalOutputUtil >
vtkTemporalFractal
A source to test AMR data object.
Definition: vtkTemporalFractal.h:38
vtkTemporalFractal::ProcessRequest
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
see vtkAlgorithm for details
vtkTemporalFractal::StartBlock
int StartBlock
Definition: vtkTemporalFractal.h:138
vtkTemporalFractal::New
static vtkTemporalFractal * New()
Standard methods for instantiation, type information, and printing.
vtkTemporalFractal::GenerateRectilinearGrids
vtkTypeBool GenerateRectilinearGrids
Definition: vtkTemporalFractal.h:222
vtkTemporalFractal::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkTemporalFractal::TwoDimensional
vtkTypeBool TwoDimensional
Definition: vtkTemporalFractal.h:215
vtkTemporalFractal::vtkTemporalFractal
vtkTemporalFractal()
vtkTemporalFractal::AddVectorArray
void AddVectorArray(vtkHierarchicalBoxDataSet *output)
vtkTemporalFractal::SetBlockInfo
void SetBlockInfo(vtkUniformGrid *grid, int level, int *ext, int onFace[6])
vtkTemporalFractal::OutputUtil
vtkSmartPointer< TemporalFractalOutputUtil > OutputUtil
Definition: vtkTemporalFractal.h:227
vtkTemporalFractal::AddGhostLevelArray
void AddGhostLevelArray(vtkDataSet *grid, int dim[3], int onFace[6])
vtkTemporalFractal::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, type information, and printing.
vtkTemporalFractal::AdaptiveSubdivision
vtkTypeBool AdaptiveSubdivision
Definition: vtkTemporalFractal.h:226
vtkTemporalFractal::AddTestArray
void AddTestArray(vtkHierarchicalBoxDataSet *output)
vtkTemporalFractal::AddBlockIdArray
void AddBlockIdArray(vtkHierarchicalBoxDataSet *output)
vtkTemporalFractal::Dimensions
int Dimensions
Definition: vtkTemporalFractal.h:211
vtkTemporalFractal::AddDepthArray
void AddDepthArray(vtkHierarchicalBoxDataSet *output)
vtkTemporalFractal::BlockCount
int BlockCount
Definition: vtkTemporalFractal.h:140
vtkTemporalFractal::RequestOneTimeStep
virtual int RequestOneTimeStep(vtkCompositeDataSet *output, vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkTemporalFractal::LineTest2
int LineTest2(float x0, float y0, float z0, float x1, float y1, float z1, double bds[6])
vtkTemporalFractal::GhostLevels
vtkTypeBool GhostLevels
Definition: vtkTemporalFractal.h:213
vtkTemporalFractal::CurrentTime
double CurrentTime
Definition: vtkTemporalFractal.h:224
vtkTemporalFractal::Traverse
void Traverse(int &blockId, int level, vtkDataObject *output, int x0, int x1, int y0, int y1, int z0, int z1, int onFace[6])
vtkTemporalFractal::MaximumLevel
int MaximumLevel
Definition: vtkTemporalFractal.h:210
vtkTemporalFractal::~vtkTemporalFractal
~vtkTemporalFractal() override
vtkTemporalFractal::CellExtentToBounds
void CellExtentToBounds(int level, int ext[6], double bds[6])
vtkTemporalFractal::GetContinuousIncrements
void GetContinuousIncrements(int extent[6], vtkIdType &incX, vtkIdType &incY, vtkIdType &incZ)
vtkTemporalFractal::LineTest
int LineTest(float x0, float y0, float z0, float x1, float y1, float z1, double bds[6], int level, int target)
vtkTemporalFractal::EndBlock
int EndBlock
Definition: vtkTemporalFractal.h:139
vtkTemporalFractal::FillOutputPortInformation
int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation *info) override
vtkTemporalFractal::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkTemporalFractal::Levels
vtkIntArray * Levels
Definition: vtkTemporalFractal.h:214
vtkTemporalFractal::MandelbrotTest
int MandelbrotTest(double x, double y)
vtkTemporalFractal::RequestDataObject
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkTemporalFractal::EvaluateSet
double EvaluateSet(double p[4])
vtkTemporalFractal::SetRBlockInfo
void SetRBlockInfo(vtkRectilinearGrid *grid, int level, int *ext, int onFace[6])
vtkTemporalFractal::FractalValue
float FractalValue
Definition: vtkTemporalFractal.h:212
vtkTemporalFractal::TwoDTest
int TwoDTest(double bds[6], int level, int target)
vtkTemporalFractal::ExecuteRectilinearMandelbrot
void ExecuteRectilinearMandelbrot(vtkRectilinearGrid *grid, double *ptr)
vtkTemporalFractal::AddFractalArray
void AddFractalArray(vtkCompositeDataSet *output)
vtkTemporalFractal::Asymmetric
int Asymmetric
Definition: vtkTemporalFractal.h:209
vtkTemporalFractal::DiscreteTimeSteps
vtkTypeBool DiscreteTimeSteps
Definition: vtkTemporalFractal.h:216
vtkTemporalFractal::InternalImageDataCopy
void InternalImageDataCopy(vtkTemporalFractal *src)
vtkUniformGrid
image data with blanking
Definition: vtkUniformGrid.h:39
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::level
@ level
Definition: vtkX3D.h:395
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkX3D::extent
@ extent
Definition: vtkX3D.h:345
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkAlgorithm.h
target
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:970
vtkSmartPointer.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315