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 "vtkImageAlgorithm.h"
39 
41 {
42 public:
43  static vtkImageMandelbrotSource *New();
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48 
49  void SetWholeExtent(int extent[6]);
50  void SetWholeExtent(int minX, int maxX, int minY, int maxY,
51  int minZ, int maxZ);
52  vtkGetVector6Macro(WholeExtent,int);
54 
56 
58  vtkSetMacro(ConstantSize, int);
59  vtkGetMacro(ConstantSize, int);
60  vtkBooleanMacro(ConstantSize, int);
62 
64 
67  void SetProjectionAxes(int x, int y, int z);
68  void SetProjectionAxes(int a[3]) {this->SetProjectionAxes(a[0],a[1],a[2]);}
69  vtkGetVector3Macro(ProjectionAxes, int);
71 
73 
75  vtkSetVector4Macro(OriginCX, double);
76  //void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
77  vtkGetVector4Macro(OriginCX, double);
79 
81 
83  vtkSetVector4Macro(SampleCX, double);
84  //void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
85  vtkGetVector4Macro(SampleCX, double);
87 
89 
92  void SetSizeCX(double cReal, double cImag, double xReal, double xImag);
93  double *GetSizeCX();
94  void GetSizeCX(double s[4]);
96 
98 
99  vtkSetClampMacro(MaximumNumberOfIterations, unsigned short,
100  static_cast<unsigned short>(1),
101  static_cast<unsigned short>(5000));
102  vtkGetMacro(MaximumNumberOfIterations, unsigned short);
104 
106 
108  void Zoom(double factor);
109  void Pan(double x, double y, double z);
111 
114  void CopyOriginAndSample(vtkImageMandelbrotSource *source);
115 
117 
118  vtkSetClampMacro(SubsampleRate, int, 1, VTK_LARGE_INTEGER);
119  vtkGetMacro(SubsampleRate, int);
121 
122 protected:
125 
126  int ProjectionAxes[3];
127 
128  // WholeExtent in 3 space (after projection).
129  int WholeExtent[6];
130 
131  // Complex constant/initial-value at origin.
132  double OriginCX[4];
133  // Initial complex value at origin.
134  double SampleCX[4];
136 
137  // A temporary vector that is computed as needed.
138  // It is used to return a vector.
139  double SizeCX[4];
140 
141  // A flag for keeping size constant (vs. keeping the spacing).
143 
145 
146  // see vtkAlgorithm for details
147  virtual int RequestData(vtkInformation *request,
148  vtkInformationVector** inputVector,
149  vtkInformationVector* outputVector);
150 
151  virtual int RequestInformation (vtkInformation *,
154  double EvaluateSet(double p[4]);
155 private:
156  vtkImageMandelbrotSource(const vtkImageMandelbrotSource&); // Not implemented.
157  void operator=(const vtkImageMandelbrotSource&); // Not implemented.
158 };
159 
160 
161 #endif
162 
163 
Store vtkAlgorithm input/output information.
a simple class to control print indentation
Definition: vtkIndent.h:37
#define VTK_IMAGING_EXPORT
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
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()
#define VTK_LARGE_INTEGER
Definition: vtkType.h:148
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)