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
33#ifndef vtkImageMandelbrotSource_h
34#define vtkImageMandelbrotSource_h
35
36#include "vtkImageAlgorithm.h"
37#include "vtkImagingSourcesModule.h" // For export macro
38
39VTK_ABI_NAMESPACE_BEGIN
40class VTKIMAGINGSOURCES_EXPORT vtkImageMandelbrotSource : public vtkImageAlgorithm
41{
42public:
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
48
51 void SetWholeExtent(int extent[6]);
52 void SetWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ);
53 vtkGetVector6Macro(WholeExtent, int);
55
57
62 vtkSetMacro(ConstantSize, vtkTypeBool);
63 vtkGetMacro(ConstantSize, vtkTypeBool);
64 vtkBooleanMacro(ConstantSize, vtkTypeBool);
66
68
73 void SetProjectionAxes(int x, int y, int z);
74 void SetProjectionAxes(int a[3]) { this->SetProjectionAxes(a[0], a[1], a[2]); }
75 vtkGetVector3Macro(ProjectionAxes, int);
77
79
83 vtkSetVector4Macro(OriginCX, double);
84 // void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
85 vtkGetVector4Macro(OriginCX, double);
87
89
93 vtkSetVector4Macro(SampleCX, double);
94 // void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
95 vtkGetVector4Macro(SampleCX, double);
97
99
105 void SetSizeCX(double cReal, double cImag, double xReal, double xImag);
107 void GetSizeCX(double s[4]);
109
111
114 vtkSetClampMacro(MaximumNumberOfIterations, unsigned short, static_cast<unsigned short>(1),
115 static_cast<unsigned short>(5000));
116 vtkGetMacro(MaximumNumberOfIterations, unsigned short);
118
120
124 void Zoom(double factor);
125 void Pan(double x, double y, double z);
127
132 void CopyOriginAndSample(vtkImageMandelbrotSource* source);
133
135
138 vtkSetClampMacro(SubsampleRate, int, 1, VTK_INT_MAX);
139 vtkGetMacro(SubsampleRate, int);
141
142protected:
145
146 int ProjectionAxes[3];
147
148 // WholeExtent in 3 space (after projection).
149 int WholeExtent[6];
150
151 // Complex constant/initial-value at origin.
152 double OriginCX[4];
153 // Initial complex value at origin.
154 double SampleCX[4];
155 unsigned short MaximumNumberOfIterations;
156
157 // A temporary vector that is computed as needed.
158 // It is used to return a vector.
159 double SizeCX[4];
160
161 // A flag for keeping size constant (vs. keeping the spacing).
162 vtkTypeBool ConstantSize;
163
164 int SubsampleRate;
165
166 // see vtkAlgorithm for details
167 int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
168 vtkInformationVector* outputVector) override;
169
170 int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
171 double EvaluateSet(double p[4]);
172
173private:
175 void operator=(const vtkImageMandelbrotSource&) = delete;
176};
177
178VTK_ABI_NAMESPACE_END
179#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.
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.
double * GetSizeCX()
Just a different way of setting the sample.
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:38
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(...)