VTK
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 =========================================================================*/
35 #ifndef vtkImageMandelbrotSource_h
36 #define vtkImageMandelbrotSource_h
37 
38 #include "vtkImagingSourcesModule.h" // For export macro
39 #include "vtkImageAlgorithm.h"
40 
42 {
43 public:
44  static vtkImageMandelbrotSource *New();
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
49 
50  void SetWholeExtent(int extent[6]);
51  void SetWholeExtent(int minX, int maxX, int minY, int maxY,
52  int minZ, int maxZ);
53  vtkGetVector6Macro(WholeExtent,int);
55 
57 
59  vtkSetMacro(ConstantSize, int);
60  vtkGetMacro(ConstantSize, int);
61  vtkBooleanMacro(ConstantSize, int);
63 
65 
68  void SetProjectionAxes(int x, int y, int z);
69  void SetProjectionAxes(int a[3]) {this->SetProjectionAxes(a[0],a[1],a[2]);}
70  vtkGetVector3Macro(ProjectionAxes, int);
72 
74 
76  vtkSetVector4Macro(OriginCX, double);
77  //void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
78  vtkGetVector4Macro(OriginCX, double);
80 
82 
84  vtkSetVector4Macro(SampleCX, double);
85  //void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
86  vtkGetVector4Macro(SampleCX, double);
88 
90 
93  void SetSizeCX(double cReal, double cImag, double xReal, double xImag);
94  double *GetSizeCX();
95  void GetSizeCX(double s[4]);
97 
99 
100  vtkSetClampMacro(MaximumNumberOfIterations, unsigned short,
101  static_cast<unsigned short>(1),
102  static_cast<unsigned short>(5000));
103  vtkGetMacro(MaximumNumberOfIterations, unsigned short);
105 
107 
109  void Zoom(double factor);
110  void Pan(double x, double y, double z);
112 
115  void CopyOriginAndSample(vtkImageMandelbrotSource *source);
116 
118 
119  vtkSetClampMacro(SubsampleRate, int, 1, VTK_INT_MAX);
120  vtkGetMacro(SubsampleRate, int);
122 
123 protected:
126 
127  int ProjectionAxes[3];
128 
129  // WholeExtent in 3 space (after projection).
130  int WholeExtent[6];
131 
132  // Complex constant/initial-value at origin.
133  double OriginCX[4];
134  // Initial complex value at origin.
135  double SampleCX[4];
137 
138  // A temporary vector that is computed as needed.
139  // It is used to return a vector.
140  double SizeCX[4];
141 
142  // A flag for keeping size constant (vs. keeping the spacing).
144 
146 
147  // see vtkAlgorithm for details
148  virtual int RequestData(vtkInformation *request,
149  vtkInformationVector** inputVector,
150  vtkInformationVector* outputVector);
151 
152  virtual int RequestInformation (vtkInformation *,
155  double EvaluateSet(double p[4]);
156 private:
157  vtkImageMandelbrotSource(const vtkImageMandelbrotSource&); // Not implemented.
158  void operator=(const vtkImageMandelbrotSource&); // Not implemented.
159 };
160 
161 
162 #endif
163 
164 
Store vtkAlgorithm input/output information.
#define VTK_INT_MAX
Definition: vtkType.h:132
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTKIMAGINGSOURCES_EXPORT
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent)
static vtkAlgorithm * New()
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)