VTK
vtkImageMandelbrotSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageMandelbrotSource.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
30 #ifndef vtkImageMandelbrotSource_h
31 #define vtkImageMandelbrotSource_h
32 
33 #include "vtkImagingSourcesModule.h" // For export macro
34 #include "vtkImageAlgorithm.h"
35 
36 class VTKIMAGINGSOURCES_EXPORT vtkImageMandelbrotSource : public vtkImageAlgorithm
37 {
38 public:
39  static vtkImageMandelbrotSource *New();
41  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
42 
44 
47  void SetWholeExtent(int extent[6]);
48  void SetWholeExtent(int minX, int maxX, int minY, int maxY,
49  int minZ, int maxZ);
50  vtkGetVector6Macro(WholeExtent,int);
52 
54 
59  vtkSetMacro(ConstantSize, int);
60  vtkGetMacro(ConstantSize, int);
61  vtkBooleanMacro(ConstantSize, int);
63 
65 
70  void SetProjectionAxes(int x, int y, int z);
71  void SetProjectionAxes(int a[3]) {this->SetProjectionAxes(a[0],a[1],a[2]);}
72  vtkGetVector3Macro(ProjectionAxes, int);
74 
76 
80  vtkSetVector4Macro(OriginCX, double);
81  //void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
82  vtkGetVector4Macro(OriginCX, double);
84 
86 
90  vtkSetVector4Macro(SampleCX, double);
91  //void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
92  vtkGetVector4Macro(SampleCX, double);
94 
96 
102  void SetSizeCX(double cReal, double cImag, double xReal, double xImag);
103  double *GetSizeCX();
104  void GetSizeCX(double s[4]);
106 
108 
111  vtkSetClampMacro(MaximumNumberOfIterations, unsigned short,
112  static_cast<unsigned short>(1),
113  static_cast<unsigned short>(5000));
114  vtkGetMacro(MaximumNumberOfIterations, unsigned short);
116 
118 
122  void Zoom(double factor);
123  void Pan(double x, double y, double z);
125 
130  void CopyOriginAndSample(vtkImageMandelbrotSource *source);
131 
133 
136  vtkSetClampMacro(SubsampleRate, int, 1, VTK_INT_MAX);
137  vtkGetMacro(SubsampleRate, int);
139 
140 protected:
142  ~vtkImageMandelbrotSource() VTK_OVERRIDE;
143 
144  int ProjectionAxes[3];
145 
146  // WholeExtent in 3 space (after projection).
147  int WholeExtent[6];
148 
149  // Complex constant/initial-value at origin.
150  double OriginCX[4];
151  // Initial complex value at origin.
152  double SampleCX[4];
154 
155  // A temporary vector that is computed as needed.
156  // It is used to return a vector.
157  double SizeCX[4];
158 
159  // A flag for keeping size constant (vs. keeping the spacing).
161 
163 
164  // see vtkAlgorithm for details
165  int RequestData(vtkInformation *request,
166  vtkInformationVector** inputVector,
167  vtkInformationVector* outputVector) VTK_OVERRIDE;
168 
171  vtkInformationVector *) VTK_OVERRIDE;
172  double EvaluateSet(double p[4]);
173 private:
174  vtkImageMandelbrotSource(const vtkImageMandelbrotSource&) VTK_DELETE_FUNCTION;
175  void operator=(const vtkImageMandelbrotSource&) VTK_DELETE_FUNCTION;
176 };
177 
178 
179 #endif
180 
181 
Store vtkAlgorithm input/output information.
#define VTK_INT_MAX
Definition: vtkType.h:157
a simple class to control print indentation
Definition: vtkIndent.h:33
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
void SetProjectionAxes(int a[3])
Set the projection from the 4D space (4 parameters / 2 imaginary numbers) to the axes of the 3D Volum...
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
boost::graph_traits< vtkGraph *>::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.