VTK  9.4.20251007
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
23
24#ifndef vtkImageMandelbrotSource_h
25#define vtkImageMandelbrotSource_h
26
27#include "vtkImageAlgorithm.h"
28#include "vtkImagingSourcesModule.h" // For export macro
29
30VTK_ABI_NAMESPACE_BEGIN
31class VTKIMAGINGSOURCES_EXPORT vtkImageMandelbrotSource : public vtkImageAlgorithm
32{
33public:
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
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
124
126
129 vtkSetClampMacro(SubsampleRate, int, 1, VTK_INT_MAX);
130 vtkGetMacro(SubsampleRate, int);
132
133protected:
136
138
139 // WholeExtent in 3 space (after projection).
141
142 // Complex constant/initial-value at origin.
143 double OriginCX[4];
144 // Initial complex value at origin.
145 double SampleCX[4];
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).
154
156
157 // see vtkAlgorithm for details
159 vtkInformationVector* outputVector) override;
160
162 double EvaluateSet(double p[4]);
163
164private:
166 void operator=(const vtkImageMandelbrotSource&) = delete;
167};
168
169VTK_ABI_NAMESPACE_END
170#endif
void Zoom(double factor)
Convenience for Viewer.
void Pan(double x, double y, double z)
Convenience for Viewer.
void SetProjectionAxes(int a[3])
Set the projection from the 4D space (4 parameters / 2 imaginary numbers) to the axes of the 3D Volum...
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called in response to a REQUEST_DATA request from the executive.
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.
void SetSizeCX(double cReal, double cImag, double xReal, double xImag)
Just a different way of setting the sample.
static vtkImageMandelbrotSource * New()
double EvaluateSet(double p[4])
void CopyOriginAndSample(vtkImageMandelbrotSource *source)
Convenience for Viewer.
void SetWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ)
Set/Get the extent of the whole output Volume.
double * GetSizeCX()
Just a different way of setting the sample.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
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.
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(...)