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 =========================================================================*/
31 #ifndef vtkTemporalFractal_h
32 #define vtkTemporalFractal_h
33 
34 #include "vtkFiltersHybridModule.h" // For export macro
35 #include "vtkAlgorithm.h"
36 #include "vtkSmartPointer.h" //for ivars
37 
39 class vtkDataSet;
41 class vtkIntArray;
42 class vtkRectilinearGrid;
43 class vtkUniformGrid;
44 class TemporalFractalOutputUtil;
45 
46 class VTKFILTERSHYBRID_EXPORT vtkTemporalFractal: public vtkAlgorithm
47 {
48 public:
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
54 
59  vtkSetMacro(FractalValue, float);
60  vtkGetMacro(FractalValue, float);
62 
64 
69  vtkSetMacro(MaximumLevel, int);
70  vtkGetMacro(MaximumLevel, int);
72 
74 
77  vtkSetMacro(Dimensions, int);
78  vtkGetMacro(Dimensions, int);
80 
82 
85  vtkSetMacro(GhostLevels, int);
86  vtkGetMacro(GhostLevels, int);
87  vtkBooleanMacro(GhostLevels, int);
89 
91 
95  vtkSetMacro(GenerateRectilinearGrids, int);
96  vtkGetMacro(GenerateRectilinearGrids, int);
97  vtkBooleanMacro(GenerateRectilinearGrids, int);
99 
101 
105  vtkSetMacro(DiscreteTimeSteps, int);
106  vtkGetMacro(DiscreteTimeSteps, int);
107  vtkBooleanMacro(DiscreteTimeSteps, int);
109 
111 
114  vtkSetMacro(TwoDimensional, int);
115  vtkGetMacro(TwoDimensional, int);
116  vtkBooleanMacro(TwoDimensional, int);
118 
120 
124  vtkSetMacro(Asymetric,int);
125  vtkGetMacro(Asymetric,int);
127 
129 
132  vtkSetMacro(AdaptiveSubdivision, int);
133  vtkGetMacro(AdaptiveSubdivision, int);
134  vtkBooleanMacro(AdaptiveSubdivision, int);
136 
137 
138 protected:
141 
142  virtual int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info);
143 
145  int EndBlock;
147 
151  virtual int ProcessRequest(vtkInformation* request,
152  vtkInformationVector** inputVector,
153  vtkInformationVector* outputVector);
154 
162 
167  virtual int RequestInformation(vtkInformation *request,
168  vtkInformationVector **inputVector,
169  vtkInformationVector *outputVector);
170 
172 
176  virtual int RequestData(vtkInformation *request,
177  vtkInformationVector **inputVector,
178  vtkInformationVector *outputVector);
180  vtkInformation *request,
181  vtkInformationVector **inputVector,
182  vtkInformationVector *outputVector);
184 
185  void Traverse(int &blockId, int level, vtkDataObject* output,
186  int x0,int x1, int y0,int y1, int z0,int z1,
187  int onFace[6]);
188 
189  int LineTest2(float x0, float y0, float z0,
190  float x1, float y1, float z1,
191  double bds[6]);
192  int LineTest(float x0, float y0, float z0,
193  float x1, float y1, float z1,
194  double bds[6], int level, int target);
195 
196  void SetBlockInfo(vtkUniformGrid *grid, int level, int* ext,int onFace[6]);
197  void SetRBlockInfo(vtkRectilinearGrid *grid, int level, int* ext,
198  int onFace[6]);
199 
205 
207  int dim[3],
208  int onFace[6]);
209 
210  int MandelbrotTest(double x, double y);
211  int TwoDTest(double bds[6], int level, int target);
212 
214  int ext[6],
215  double bds[6]);
216 
218  double *ptr);
219  double EvaluateSet(double p[4]);
221  vtkIdType &incX,
222  vtkIdType &incY,
223  vtkIdType &incZ);
224 
225  // Dimensions:
226  // Specify blocks relative to this top level block.
227  // For now this has to be set before the blocks are defined.
228  vtkSetVector3Macro(TopLevelSpacing, double);
229  vtkGetVector3Macro(TopLevelSpacing, double);
230  vtkSetVector3Macro(TopLevelOrigin, double);
231  vtkGetVector3Macro(TopLevelOrigin, double);
232 
234 
243 
244  // New method of specifing blocks.
245  double TopLevelSpacing[3];
246  double TopLevelOrigin[3];
247 
249 
250  double CurrentTime;
251 
254 
255 private:
256  vtkTemporalFractal(const vtkTemporalFractal&) VTK_DELETE_FUNCTION;
257  void operator=(const vtkTemporalFractal&) VTK_DELETE_FUNCTION;
258 };
259 
260 
261 #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:240
vtkTemporalFractal::BlockCount
int BlockCount
Definition: vtkTemporalFractal.h:146
vtkTemporalFractal::ProcessRequest
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
see vtkAlgorithm for details
vtkTemporalFractal::FillOutputPortInformation
virtual int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation *info)
vtkTemporalFractal::RequestOneTimeStep
virtual int RequestOneTimeStep(vtkCompositeDataSet *output, vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:60
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:253
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::Asymetric
int Asymetric
Definition: vtkTemporalFractal.h:235
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:250
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::AdaptiveSubdivision
int AdaptiveSubdivision
Definition: vtkTemporalFractal.h:252
vtkTemporalFractal::TwoDimensional
int TwoDimensional
Definition: vtkTemporalFractal.h:241
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::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::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::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkTemporalFractal::New
static vtkTemporalFractal * New()
vtkTemporalFractal::EndBlock
int EndBlock
Definition: vtkTemporalFractal.h:145
vtkTemporalFractal
A source to test AMR data object.
Definition: vtkTemporalFractal.h:47
vtkTemporalFractal::GenerateRectilinearGrids
int GenerateRectilinearGrids
Definition: vtkTemporalFractal.h:248
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
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::StartBlock
int StartBlock
Definition: vtkTemporalFractal.h:144
vtkTemporalFractal::AddTestArray
void AddTestArray(vtkHierarchicalBoxDataSet *output)
vtkTemporalFractal::vtkTemporalFractal
vtkTemporalFractal()
vtkTemporalFractal::EvaluateSet
double EvaluateSet(double p[4])
vtkTemporalFractal::~vtkTemporalFractal
~vtkTemporalFractal()
vtkTemporalFractal::InternalImageDataCopy
void InternalImageDataCopy(vtkTemporalFractal *src)
vtkTemporalFractal::GhostLevels
int GhostLevels
Definition: vtkTemporalFractal.h:239
vtkX3D::extent
@ extent
Definition: vtkX3D.h:345
vtkTemporalFractal::MaximumLevel
int MaximumLevel
Definition: vtkTemporalFractal.h:236
target
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:829
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkTemporalFractal::Dimensions
int Dimensions
Definition: vtkTemporalFractal.h:237
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])
vtkTemporalFractal::DiscreteTimeSteps
int DiscreteTimeSteps
Definition: vtkTemporalFractal.h:242
vtkTemporalFractal::FractalValue
float FractalValue
Definition: vtkTemporalFractal.h:238