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 =========================================================================*/
32 #ifndef vtkTemporalFractal_h
33 #define vtkTemporalFractal_h
34 
35 #include "vtkFiltersHybridModule.h" // For export macro
36 #include "vtkAlgorithm.h"
37 #include "vtkSmartPointer.h" //for ivars
38 
40 class vtkDataSet;
42 class vtkIntArray;
43 class vtkRectilinearGrid;
44 class vtkUniformGrid;
45 class TemporalFractalOutputUtil;
46 
47 class VTKFILTERSHYBRID_EXPORT vtkTemporalFractal: public vtkAlgorithm
48 {
49 public:
51 
56  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
60 
64  vtkSetMacro(FractalValue, float);
65  vtkGetMacro(FractalValue, float);
67 
69 
74  vtkSetMacro(MaximumLevel, int);
75  vtkGetMacro(MaximumLevel, int);
77 
79 
82  vtkSetMacro(Dimensions, int);
83  vtkGetMacro(Dimensions, int);
85 
87 
90  vtkSetMacro(GhostLevels, vtkTypeBool);
91  vtkGetMacro(GhostLevels, vtkTypeBool);
92  vtkBooleanMacro(GhostLevels, vtkTypeBool);
94 
96 
100  vtkSetMacro(GenerateRectilinearGrids, vtkTypeBool);
101  vtkGetMacro(GenerateRectilinearGrids, vtkTypeBool);
102  vtkBooleanMacro(GenerateRectilinearGrids, vtkTypeBool);
104 
106 
110  vtkSetMacro(DiscreteTimeSteps, vtkTypeBool);
111  vtkGetMacro(DiscreteTimeSteps, vtkTypeBool);
112  vtkBooleanMacro(DiscreteTimeSteps, vtkTypeBool);
114 
116 
119  vtkSetMacro(TwoDimensional, vtkTypeBool);
120  vtkGetMacro(TwoDimensional, vtkTypeBool);
121  vtkBooleanMacro(TwoDimensional, vtkTypeBool);
123 
125 
129  vtkSetMacro(Asymmetric,int);
130  vtkGetMacro(Asymmetric,int);
132 
134 
137  vtkSetMacro(AdaptiveSubdivision, vtkTypeBool);
138  vtkGetMacro(AdaptiveSubdivision, vtkTypeBool);
139  vtkBooleanMacro(AdaptiveSubdivision, vtkTypeBool);
141 
142 
143 protected:
146 
147  int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info) override;
148 
150  int EndBlock;
152 
157  vtkInformationVector** inputVector,
158  vtkInformationVector* outputVector) override;
159 
167 
172  virtual int RequestInformation(vtkInformation *request,
173  vtkInformationVector **inputVector,
174  vtkInformationVector *outputVector);
175 
177 
181  virtual int RequestData(vtkInformation *request,
182  vtkInformationVector **inputVector,
183  vtkInformationVector *outputVector);
185  vtkInformation *request,
186  vtkInformationVector **inputVector,
187  vtkInformationVector *outputVector);
189 
190  void Traverse(int &blockId, int level, vtkDataObject* output,
191  int x0,int x1, int y0,int y1, int z0,int z1,
192  int onFace[6]);
193 
194  int LineTest2(float x0, float y0, float z0,
195  float x1, float y1, float z1,
196  double bds[6]);
197  int LineTest(float x0, float y0, float z0,
198  float x1, float y1, float z1,
199  double bds[6], int level, int target);
200 
201  void SetBlockInfo(vtkUniformGrid *grid, int level, int* ext,int onFace[6]);
202  void SetRBlockInfo(vtkRectilinearGrid *grid, int level, int* ext,
203  int onFace[6]);
204 
210 
212  int dim[3],
213  int onFace[6]);
214 
215  int MandelbrotTest(double x, double y);
216  int TwoDTest(double bds[6], int level, int target);
217 
219  int ext[6],
220  double bds[6]);
221 
223  double *ptr);
224  double EvaluateSet(double p[4]);
226  vtkIdType &incX,
227  vtkIdType &incY,
228  vtkIdType &incZ);
229 
230  // Dimensions:
231  // Specify blocks relative to this top level block.
232  // For now this has to be set before the blocks are defined.
233  vtkSetVector3Macro(TopLevelSpacing, double);
234  vtkGetVector3Macro(TopLevelSpacing, double);
235  vtkSetVector3Macro(TopLevelOrigin, double);
236  vtkGetVector3Macro(TopLevelOrigin, double);
237 
239 
248 
249  // New method of specifying blocks.
250  double TopLevelSpacing[3];
251  double TopLevelOrigin[3];
252 
254 
255  double CurrentTime;
256 
259 
260 private:
261  vtkTemporalFractal(const vtkTemporalFractal&) = delete;
262  void operator=(const vtkTemporalFractal&) = delete;
263 };
264 
265 
266 #endif
vtkTemporalFractal::AddGhostLevelArray
void AddGhostLevelArray(vtkDataSet *grid, int dim[3], int onFace[6])
vtkTemporalFractal::AddBlockIdArray
void AddBlockIdArray(vtkHierarchicalBoxDataSet *output)
vtkTemporalFractal::TwoDTest
int TwoDTest(double bds[6], int level, int target)
vtkTemporalFractal::Levels
vtkIntArray * Levels
Definition: vtkTemporalFractal.h:245
vtkTemporalFractal::BlockCount
int BlockCount
Definition: vtkTemporalFractal.h:151
vtkTemporalFractal::ProcessRequest
int ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
see vtkAlgorithm for details
vtkTemporalFractal::RequestOneTimeStep
virtual int RequestOneTimeStep(vtkCompositeDataSet *output, vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:60
vtkTemporalFractal::GhostLevels
vtkTypeBool GhostLevels
Definition: vtkTemporalFractal.h:244
vtkRectilinearGrid
a dataset that is topologically regular with variable spacing in the three coordinate directions
Definition: vtkRectilinearGrid.h:57
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkTemporalFractal::OutputUtil
vtkSmartPointer< TemporalFractalOutputUtil > OutputUtil
Definition: vtkTemporalFractal.h:258
vtkTemporalFractal::Asymmetric
int Asymmetric
Definition: vtkTemporalFractal.h:240
vtkUniformGrid
image data with blanking
Definition: vtkUniformGrid.h:41
vtkTemporalFractal::ExecuteRectilinearMandelbrot
void ExecuteRectilinearMandelbrot(vtkRectilinearGrid *grid, double *ptr)
vtkTemporalFractal::SetBlockInfo
void SetBlockInfo(vtkUniformGrid *grid, int level, int *ext, int onFace[6])
vtkSmartPointer< TemporalFractalOutputUtil >
vtkTemporalFractal::TwoDimensional
vtkTypeBool TwoDimensional
Definition: vtkTemporalFractal.h:246
vtkHierarchicalBoxDataSet
Backwards compatibility class.
Definition: vtkHierarchicalBoxDataSet.h:39
vtkCompositeDataSet
abstract superclass for composite (multi-block or AMR) datasets
Definition: vtkCompositeDataSet.h:52
vtkTemporalFractal::CurrentTime
double CurrentTime
Definition: vtkTemporalFractal.h:255
vtkAlgorithm.h
vtkTemporalFractal::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkTemporalFractal::AddDepthArray
void AddDepthArray(vtkHierarchicalBoxDataSet *output)
vtkX3D::level
@ level
Definition: vtkX3D.h:395
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkTemporalFractal::MandelbrotTest
int MandelbrotTest(double x, double y)
vtkTemporalFractal::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkTemporalFractal::AddFractalArray
void AddFractalArray(vtkCompositeDataSet *output)
vtkTemporalFractal::GetContinuousIncrements
void GetContinuousIncrements(int extent[6], vtkIdType &incX, vtkIdType &incY, vtkIdType &incZ)
vtkTemporalFractal::~vtkTemporalFractal
~vtkTemporalFractal() override
vtkTemporalFractal::DiscreteTimeSteps
vtkTypeBool DiscreteTimeSteps
Definition: vtkTemporalFractal.h:247
vtkTemporalFractal::SetRBlockInfo
void SetRBlockInfo(vtkRectilinearGrid *grid, int level, int *ext, int onFace[6])
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkIntArray
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:46
vtkTemporalFractal::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTemporalFractal::CellExtentToBounds
void CellExtentToBounds(int level, int ext[6], double bds[6])
vtkTemporalFractal::RequestDataObject
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkSmartPointer.h
vtkTemporalFractal::New
static vtkTemporalFractal * New()
Standard methods for instantiation, type information, and printing.
vtkTemporalFractal::GenerateRectilinearGrids
vtkTypeBool GenerateRectilinearGrids
Definition: vtkTemporalFractal.h:253
vtkTemporalFractal::EndBlock
int EndBlock
Definition: vtkTemporalFractal.h:150
vtkTemporalFractal
A source to test AMR data object.
Definition: vtkTemporalFractal.h:48
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkX3D::info
@ info
Definition: vtkX3D.h:376
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::LineTest
int LineTest(float x0, float y0, float z0, float x1, float y1, float z1, double bds[6], int level, int target)
vtkTemporalFractal::AdaptiveSubdivision
vtkTypeBool AdaptiveSubdivision
Definition: vtkTemporalFractal.h:257
vtkTemporalFractal::StartBlock
int StartBlock
Definition: vtkTemporalFractal.h:149
vtkTemporalFractal::AddTestArray
void AddTestArray(vtkHierarchicalBoxDataSet *output)
vtkTemporalFractal::vtkTemporalFractal
vtkTemporalFractal()
vtkTemporalFractal::EvaluateSet
double EvaluateSet(double p[4])
vtkTemporalFractal::InternalImageDataCopy
void InternalImageDataCopy(vtkTemporalFractal *src)
vtkX3D::extent
@ extent
Definition: vtkX3D.h:345
vtkTemporalFractal::MaximumLevel
int MaximumLevel
Definition: vtkTemporalFractal.h:241
target
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:832
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkTemporalFractal::Dimensions
int Dimensions
Definition: vtkTemporalFractal.h:242
vtkTemporalFractal::AddVectorArray
void AddVectorArray(vtkHierarchicalBoxDataSet *output)
vtkTemporalFractal::LineTest2
int LineTest2(float x0, float y0, float z0, float x1, float y1, float z1, double bds[6])
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkTemporalFractal::FillOutputPortInformation
int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation *info) override
vtkTemporalFractal::FractalValue
float FractalValue
Definition: vtkTemporalFractal.h:243