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=========================================================================*/
39#ifndef vtkImageMandelbrotSource_h
40#define vtkImageMandelbrotSource_h
41
42#include "vtkImageAlgorithm.h"
43#include "vtkImagingSourcesModule.h" // For export macro
44
45class VTKIMAGINGSOURCES_EXPORT vtkImageMandelbrotSource : public vtkImageAlgorithm
46{
47public:
50 void PrintSelf(ostream& os, vtkIndent indent) override;
51
53
56 void SetWholeExtent(int extent[6]);
57 void SetWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ);
58 vtkGetVector6Macro(WholeExtent, int);
60
62
67 vtkSetMacro(ConstantSize, vtkTypeBool);
68 vtkGetMacro(ConstantSize, vtkTypeBool);
69 vtkBooleanMacro(ConstantSize, vtkTypeBool);
71
73
78 void SetProjectionAxes(int x, int y, int z);
79 void SetProjectionAxes(int a[3]) { this->SetProjectionAxes(a[0], a[1], a[2]); }
80 vtkGetVector3Macro(ProjectionAxes, int);
82
84
88 vtkSetVector4Macro(OriginCX, double);
89 // void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
90 vtkGetVector4Macro(OriginCX, double);
92
94
98 vtkSetVector4Macro(SampleCX, double);
99 // void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
100 vtkGetVector4Macro(SampleCX, double);
102
104
110 void SetSizeCX(double cReal, double cImag, double xReal, double xImag);
112 void GetSizeCX(double s[4]);
114
116
119 vtkSetClampMacro(MaximumNumberOfIterations, unsigned short, static_cast<unsigned short>(1),
120 static_cast<unsigned short>(5000));
121 vtkGetMacro(MaximumNumberOfIterations, unsigned short);
123
125
129 void Zoom(double factor);
130 void Pan(double x, double y, double z);
132
137 void CopyOriginAndSample(vtkImageMandelbrotSource* source);
138
140
143 vtkSetClampMacro(SubsampleRate, int, 1, VTK_INT_MAX);
144 vtkGetMacro(SubsampleRate, int);
146
147protected:
150
151 int ProjectionAxes[3];
152
153 // WholeExtent in 3 space (after projection).
154 int WholeExtent[6];
155
156 // Complex constant/initial-value at origin.
157 double OriginCX[4];
158 // Initial complex value at origin.
159 double SampleCX[4];
160 unsigned short MaximumNumberOfIterations;
161
162 // A temporary vector that is computed as needed.
163 // It is used to return a vector.
164 double SizeCX[4];
165
166 // A flag for keeping size constant (vs. keeping the spacing).
167 vtkTypeBool ConstantSize;
168
169 int SubsampleRate;
170
171 // see vtkAlgorithm for details
172 int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
173 vtkInformationVector* outputVector) override;
174
175 int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
176 double EvaluateSet(double p[4]);
177
178private:
180 void operator=(const vtkImageMandelbrotSource&) = delete;
181};
182
183#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:43
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(...)