VTK  9.2.6
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 =========================================================================*/
145 #ifndef vtkImageMandelbrotSource_h
146 #define vtkImageMandelbrotSource_h
147 
148 #include "vtkImageAlgorithm.h"
149 #include "vtkImagingSourcesModule.h" // For export macro
150 
151 class VTKIMAGINGSOURCES_EXPORT vtkImageMandelbrotSource : public vtkImageAlgorithm
152 {
153 public:
156  void PrintSelf(ostream& os, vtkIndent indent) override;
157 
159 
162  void SetWholeExtent(int extent[6]);
163  void SetWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ);
164  vtkGetVector6Macro(WholeExtent, int);
166 
168 
173  vtkSetMacro(ConstantSize, vtkTypeBool);
174  vtkGetMacro(ConstantSize, vtkTypeBool);
175  vtkBooleanMacro(ConstantSize, vtkTypeBool);
177 
179 
184  void SetProjectionAxes(int x, int y, int z);
185  void SetProjectionAxes(int a[3]) { this->SetProjectionAxes(a[0], a[1], a[2]); }
186  vtkGetVector3Macro(ProjectionAxes, int);
188 
190 
194  vtkSetVector4Macro(OriginCX, double);
195  // void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
196  vtkGetVector4Macro(OriginCX, double);
198 
200 
204  vtkSetVector4Macro(SampleCX, double);
205  // void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
206  vtkGetVector4Macro(SampleCX, double);
208 
210 
216  void SetSizeCX(double cReal, double cImag, double xReal, double xImag);
217  double* GetSizeCX() VTK_SIZEHINT(4);
218  void GetSizeCX(double s[4]);
220 
222 
225  vtkSetClampMacro(MaximumNumberOfIterations, unsigned short, static_cast<unsigned short>(1),
226  static_cast<unsigned short>(5000));
227  vtkGetMacro(MaximumNumberOfIterations, unsigned short);
229 
231 
235  void Zoom(double factor);
236  void Pan(double x, double y, double z);
238 
243  void CopyOriginAndSample(vtkImageMandelbrotSource* source);
244 
246 
249  vtkSetClampMacro(SubsampleRate, int, 1, VTK_INT_MAX);
250  vtkGetMacro(SubsampleRate, int);
252 
253 protected:
256 
257  int ProjectionAxes[3];
258 
259  // WholeExtent in 3 space (after projection).
260  int WholeExtent[6];
261 
262  // Complex constant/initial-value at origin.
263  double OriginCX[4];
264  // Initial complex value at origin.
265  double SampleCX[4];
266  unsigned short MaximumNumberOfIterations;
267 
268  // A temporary vector that is computed as needed.
269  // It is used to return a vector.
270  double SizeCX[4];
271 
272  // A flag for keeping size constant (vs. keeping the spacing).
273  vtkTypeBool ConstantSize;
274 
275  int SubsampleRate;
276 
277  // see vtkAlgorithm for details
278  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
279  vtkInformationVector* outputVector) override;
280 
281  int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
282  double EvaluateSet(double p[4]);
283 
284 private:
286  void operator=(const vtkImageMandelbrotSource&) = delete;
287 };
288 
289 #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.
double * GetSizeCX()
Just a different way of setting the sample.
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.
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:119
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(...)