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 =========================================================================*/
36 #ifndef vtkImageMandelbrotSource_h
37 #define vtkImageMandelbrotSource_h
38 
39 #include "vtkImagingSourcesModule.h" // For export macro
40 #include "vtkImageAlgorithm.h"
41 
42 class VTKIMAGINGSOURCES_EXPORT vtkImageMandelbrotSource : public vtkImageAlgorithm
43 {
44 public:
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
50 
53  void SetWholeExtent(int extent[6]);
54  void SetWholeExtent(int minX, int maxX, int minY, int maxY,
55  int minZ, int maxZ);
56  vtkGetVector6Macro(WholeExtent,int);
58 
60 
65  vtkSetMacro(ConstantSize, int);
66  vtkGetMacro(ConstantSize, int);
67  vtkBooleanMacro(ConstantSize, int);
69 
71 
76  void SetProjectionAxes(int x, int y, int z);
77  void SetProjectionAxes(int a[3]) {this->SetProjectionAxes(a[0],a[1],a[2]);}
78  vtkGetVector3Macro(ProjectionAxes, int);
80 
82 
86  vtkSetVector4Macro(OriginCX, double);
87  //void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
88  vtkGetVector4Macro(OriginCX, double);
90 
92 
96  vtkSetVector4Macro(SampleCX, double);
97  //void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
98  vtkGetVector4Macro(SampleCX, double);
100 
102 
108  void SetSizeCX(double cReal, double cImag, double xReal, double xImag);
109  double *GetSizeCX();
110  void GetSizeCX(double s[4]);
112 
114 
117  vtkSetClampMacro(MaximumNumberOfIterations, unsigned short,
118  static_cast<unsigned short>(1),
119  static_cast<unsigned short>(5000));
120  vtkGetMacro(MaximumNumberOfIterations, unsigned short);
122 
124 
128  void Zoom(double factor);
129  void Pan(double x, double y, double z);
131 
137 
139 
142  vtkSetClampMacro(SubsampleRate, int, 1, VTK_INT_MAX);
143  vtkGetMacro(SubsampleRate, int);
145 
146 protected:
149 
150  int ProjectionAxes[3];
151 
152  // WholeExtent in 3 space (after projection).
153  int WholeExtent[6];
154 
155  // Complex constant/initial-value at origin.
156  double OriginCX[4];
157  // Initial complex value at origin.
158  double SampleCX[4];
160 
161  // A temporary vector that is computed as needed.
162  // It is used to return a vector.
163  double SizeCX[4];
164 
165  // A flag for keeping size constant (vs. keeping the spacing).
167 
169 
170  // see vtkAlgorithm for details
171  virtual int RequestData(vtkInformation *request,
172  vtkInformationVector** inputVector,
173  vtkInformationVector* outputVector);
174 
178  double EvaluateSet(double p[4]);
179 private:
180  vtkImageMandelbrotSource(const vtkImageMandelbrotSource&) VTK_DELETE_FUNCTION;
181  void operator=(const vtkImageMandelbrotSource&) VTK_DELETE_FUNCTION;
182 };
183 
184 
185 #endif
186 
187 
vtkImageMandelbrotSource::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:153
vtkImageMandelbrotSource::MaximumNumberOfIterations
unsigned short MaximumNumberOfIterations
Definition: vtkImageMandelbrotSource.h:159
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkImageMandelbrotSource::SetProjectionAxes
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...
vtkImageAlgorithm.h
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:41
vtkImageMandelbrotSource::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:822
vtkImageMandelbrotSource::RequestInformation
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkImageMandelbrotSource::SetProjectionAxes
void SetProjectionAxes(int a[3])
Definition: vtkImageMandelbrotSource.h:77
vtkImageMandelbrotSource::GetSizeCX
void GetSizeCX(double s[4])
vtkImageMandelbrotSource::SubsampleRate
int SubsampleRate
Definition: vtkImageMandelbrotSource.h:168
vtkImageMandelbrotSource::Zoom
void Zoom(double factor)
Convienence for Viewer.
vtkImageMandelbrotSource::CopyOriginAndSample
void CopyOriginAndSample(vtkImageMandelbrotSource *source)
Convienence for Viewer.
vtkImageMandelbrotSource::~vtkImageMandelbrotSource
~vtkImageMandelbrotSource()
vtkImageMandelbrotSource::SetWholeExtent
void SetWholeExtent(int extent[6])
Set/Get the extent of the whole output Volume.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkImageMandelbrotSource::ConstantSize
int ConstantSize
Definition: vtkImageMandelbrotSource.h:166
vtkImageMandelbrotSource::vtkImageMandelbrotSource
vtkImageMandelbrotSource()
vtkImageMandelbrotSource::GetSizeCX
double * GetSizeCX()
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkImageMandelbrotSource::EvaluateSet
double EvaluateSet(double p[4])
vtkImageMandelbrotSource::Pan
void Pan(double x, double y, double z)
vtkImageMandelbrotSource::SetWholeExtent
void SetWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ)
vtkImageMandelbrotSource::SetSizeCX
void SetSizeCX(double cReal, double cImag, double xReal, double xImag)
Just a different way of setting the sample.
vtkX3D::extent
@ extent
Definition: vtkX3D.h:345
vtkImageMandelbrotSource
Mandelbrot image.
Definition: vtkImageMandelbrotSource.h:43
vtkImageMandelbrotSource::New
static vtkImageMandelbrotSource * New()