Loading [MathJax]/extensions/tex2jax.js
VTK  9.4.20250327
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
133#ifndef vtkImageMandelbrotSource_h
134#define vtkImageMandelbrotSource_h
135
136#include "vtkImageAlgorithm.h"
137#include "vtkImagingSourcesModule.h" // For export macro
138
139VTK_ABI_NAMESPACE_BEGIN
140class VTKIMAGINGSOURCES_EXPORT vtkImageMandelbrotSource : public vtkImageAlgorithm
141{
142public:
145 void PrintSelf(ostream& os, vtkIndent indent) override;
146
148
151 void SetWholeExtent(int extent[6]);
152 void SetWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ);
153 vtkGetVector6Macro(WholeExtent, int);
155
157
162 vtkSetMacro(ConstantSize, vtkTypeBool);
163 vtkGetMacro(ConstantSize, vtkTypeBool);
164 vtkBooleanMacro(ConstantSize, vtkTypeBool);
166
168
173 void SetProjectionAxes(int x, int y, int z);
174 void SetProjectionAxes(int a[3]) { this->SetProjectionAxes(a[0], a[1], a[2]); }
175 vtkGetVector3Macro(ProjectionAxes, int);
177
179
183 vtkSetVector4Macro(OriginCX, double);
184 // void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
185 vtkGetVector4Macro(OriginCX, double);
187
189
193 vtkSetVector4Macro(SampleCX, double);
194 // void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
195 vtkGetVector4Macro(SampleCX, double);
197
199
205 void SetSizeCX(double cReal, double cImag, double xReal, double xImag);
207 void GetSizeCX(double s[4]);
209
211
214 vtkSetClampMacro(MaximumNumberOfIterations, unsigned short, static_cast<unsigned short>(1),
215 static_cast<unsigned short>(5000));
216 vtkGetMacro(MaximumNumberOfIterations, unsigned short);
218
220
224 void Zoom(double factor);
225 void Pan(double x, double y, double z);
227
232 void CopyOriginAndSample(vtkImageMandelbrotSource* source);
233
235
238 vtkSetClampMacro(SubsampleRate, int, 1, VTK_INT_MAX);
239 vtkGetMacro(SubsampleRate, int);
241
242protected:
245
246 int ProjectionAxes[3];
247
248 // WholeExtent in 3 space (after projection).
249 int WholeExtent[6];
250
251 // Complex constant/initial-value at origin.
252 double OriginCX[4];
253 // Initial complex value at origin.
254 double SampleCX[4];
255 unsigned short MaximumNumberOfIterations;
256
257 // A temporary vector that is computed as needed.
258 // It is used to return a vector.
259 double SizeCX[4];
260
261 // A flag for keeping size constant (vs. keeping the spacing).
262 vtkTypeBool ConstantSize;
263
264 int SubsampleRate;
265
266 // see vtkAlgorithm for details
267 int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
268 vtkInformationVector* outputVector) override;
269
270 int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
271 double EvaluateSet(double p[4]);
272
273private:
275 void operator=(const vtkImageMandelbrotSource&) = delete;
276};
277
278VTK_ABI_NAMESPACE_END
279#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:108
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:161
#define VTK_SIZEHINT(...)