VTK  9.3.0
vtkImageMandelbrotSource.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
24 #ifndef vtkImageMandelbrotSource_h
25 #define vtkImageMandelbrotSource_h
26 
27 #include "vtkImageAlgorithm.h"
28 #include "vtkImagingSourcesModule.h" // For export macro
29 
30 VTK_ABI_NAMESPACE_BEGIN
31 class VTKIMAGINGSOURCES_EXPORT vtkImageMandelbrotSource : public vtkImageAlgorithm
32 {
33 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
39 
42  void SetWholeExtent(int extent[6]);
43  void SetWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ);
44  vtkGetVector6Macro(WholeExtent, int);
46 
48 
53  vtkSetMacro(ConstantSize, vtkTypeBool);
54  vtkGetMacro(ConstantSize, vtkTypeBool);
55  vtkBooleanMacro(ConstantSize, vtkTypeBool);
57 
59 
64  void SetProjectionAxes(int x, int y, int z);
65  void SetProjectionAxes(int a[3]) { this->SetProjectionAxes(a[0], a[1], a[2]); }
66  vtkGetVector3Macro(ProjectionAxes, int);
68 
70 
74  vtkSetVector4Macro(OriginCX, double);
75  // void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
76  vtkGetVector4Macro(OriginCX, double);
78 
80 
84  vtkSetVector4Macro(SampleCX, double);
85  // void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
86  vtkGetVector4Macro(SampleCX, double);
88 
90 
96  void SetSizeCX(double cReal, double cImag, double xReal, double xImag);
97  double* GetSizeCX() VTK_SIZEHINT(4);
98  void GetSizeCX(double s[4]);
100 
102 
105  vtkSetClampMacro(MaximumNumberOfIterations, unsigned short, static_cast<unsigned short>(1),
106  static_cast<unsigned short>(5000));
107  vtkGetMacro(MaximumNumberOfIterations, unsigned short);
109 
111 
115  void Zoom(double factor);
116  void Pan(double x, double y, double z);
118 
123  void CopyOriginAndSample(vtkImageMandelbrotSource* source);
124 
126 
129  vtkSetClampMacro(SubsampleRate, int, 1, VTK_INT_MAX);
130  vtkGetMacro(SubsampleRate, int);
132 
133 protected:
136 
137  int ProjectionAxes[3];
138 
139  // WholeExtent in 3 space (after projection).
140  int WholeExtent[6];
141 
142  // Complex constant/initial-value at origin.
143  double OriginCX[4];
144  // Initial complex value at origin.
145  double SampleCX[4];
146  unsigned short MaximumNumberOfIterations;
147 
148  // A temporary vector that is computed as needed.
149  // It is used to return a vector.
150  double SizeCX[4];
151 
152  // A flag for keeping size constant (vs. keeping the spacing).
153  vtkTypeBool ConstantSize;
154 
155  int SubsampleRate;
156 
157  // see vtkAlgorithm for details
158  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
159  vtkInformationVector* outputVector) override;
160 
161  int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
162  double EvaluateSet(double p[4]);
163 
164 private:
166  void operator=(const vtkImageMandelbrotSource&) = delete;
167 };
168 
169 VTK_ABI_NAMESPACE_END
170 #endif
Generic algorithm superclass for image algs.
void SetProjectionAxes(int a[3])
Set the projection from the 4D space (4 parameters / 2 imaginary numbers) to the axes of the 3D Volum...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetWholeExtent(int extent[6])
Set/Get the extent of the whole output Volume.
double * GetSizeCX()
Just a different way of setting the sample.
void SetSizeCX(double cReal, double cImag, double xReal, double xImag)
Just a different way of setting the sample.
static vtkImageMandelbrotSource * New()
void SetWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ)
Set/Get the extent of the whole output Volume.
void SetProjectionAxes(int x, int y, int z)
Set the projection from the 4D space (4 parameters / 2 imaginary numbers) to the axes of the 3D Volum...
a simple class to control print indentation
Definition: vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
@ extent
Definition: vtkX3D.h:345
int vtkTypeBool
Definition: vtkABI.h:64
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define VTK_INT_MAX
Definition: vtkType.h:144
#define VTK_SIZEHINT(...)