VTK  9.1.0
vtkImageMandelbrotSource.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImageMandelbrotSource.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
139#ifndef vtkImageMandelbrotSource_h
140#define vtkImageMandelbrotSource_h
141
142#include "vtkImageAlgorithm.h"
143#include "vtkImagingSourcesModule.h" // For export macro
144
145class VTKIMAGINGSOURCES_EXPORT vtkImageMandelbrotSource : public vtkImageAlgorithm
146{
147public:
150 void PrintSelf(ostream& os, vtkIndent indent) override;
151
153
156 void SetWholeExtent(int extent[6]);
157 void SetWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ);
158 vtkGetVector6Macro(WholeExtent, int);
160
162
167 vtkSetMacro(ConstantSize, vtkTypeBool);
168 vtkGetMacro(ConstantSize, vtkTypeBool);
169 vtkBooleanMacro(ConstantSize, vtkTypeBool);
171
173
178 void SetProjectionAxes(int x, int y, int z);
179 void SetProjectionAxes(int a[3]) { this->SetProjectionAxes(a[0], a[1], a[2]); }
180 vtkGetVector3Macro(ProjectionAxes, int);
182
184
188 vtkSetVector4Macro(OriginCX, double);
189 // void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
190 vtkGetVector4Macro(OriginCX, double);
192
194
198 vtkSetVector4Macro(SampleCX, double);
199 // void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
200 vtkGetVector4Macro(SampleCX, double);
202
204
210 void SetSizeCX(double cReal, double cImag, double xReal, double xImag);
212 void GetSizeCX(double s[4]);
214
216
219 vtkSetClampMacro(MaximumNumberOfIterations, unsigned short, static_cast<unsigned short>(1),
220 static_cast<unsigned short>(5000));
221 vtkGetMacro(MaximumNumberOfIterations, unsigned short);
223
225
229 void Zoom(double factor);
230 void Pan(double x, double y, double z);
232
237 void CopyOriginAndSample(vtkImageMandelbrotSource* source);
238
240
243 vtkSetClampMacro(SubsampleRate, int, 1, VTK_INT_MAX);
244 vtkGetMacro(SubsampleRate, int);
246
247protected:
250
251 int ProjectionAxes[3];
252
253 // WholeExtent in 3 space (after projection).
254 int WholeExtent[6];
255
256 // Complex constant/initial-value at origin.
257 double OriginCX[4];
258 // Initial complex value at origin.
259 double SampleCX[4];
260 unsigned short MaximumNumberOfIterations;
261
262 // A temporary vector that is computed as needed.
263 // It is used to return a vector.
264 double SizeCX[4];
265
266 // A flag for keeping size constant (vs. keeping the spacing).
267 vtkTypeBool ConstantSize;
268
269 int SubsampleRate;
270
271 // see vtkAlgorithm for details
272 int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
273 vtkInformationVector* outputVector) override;
274
275 int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
276 double EvaluateSet(double p[4]);
277
278private:
280 void operator=(const vtkImageMandelbrotSource&) = delete;
281};
282
283#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:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
@ extent
Definition: vtkX3D.h:351
int vtkTypeBool
Definition: vtkABI.h:69
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define VTK_INT_MAX
Definition: vtkType.h:155
#define VTK_SIZEHINT(...)