VTK  9.5.20251126
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
132
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
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
233
235
238 vtkSetClampMacro(SubsampleRate, int, 1, VTK_INT_MAX);
239 vtkGetMacro(SubsampleRate, int);
241
242protected:
245
247
248 // WholeExtent in 3 space (after projection).
250
251 // Complex constant/initial-value at origin.
252 double OriginCX[4];
253 // Initial complex value at origin.
254 double SampleCX[4];
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).
263
265
266 // see vtkAlgorithm for details
268 vtkInformationVector* outputVector) override;
269
271 double EvaluateSet(double p[4]);
272
273private:
275 void operator=(const vtkImageMandelbrotSource&) = delete;
276};
277
278VTK_ABI_NAMESPACE_END
279#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: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:196
#define VTK_SIZEHINT(...)