00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00035 #ifndef __vtkImageMandelbrotSource_h
00036 #define __vtkImageMandelbrotSource_h
00037
00038 #include "vtkImageAlgorithm.h"
00039
00040 class VTK_IMAGING_EXPORT vtkImageMandelbrotSource : public vtkImageAlgorithm
00041 {
00042 public:
00043 static vtkImageMandelbrotSource *New();
00044 vtkTypeRevisionMacro(vtkImageMandelbrotSource,vtkImageAlgorithm);
00045 void PrintSelf(ostream& os, vtkIndent indent);
00046
00048
00049 void SetWholeExtent(int extent[6]);
00050 void SetWholeExtent(int minX, int maxX, int minY, int maxY,
00051 int minZ, int maxZ);
00052 vtkGetVector6Macro(WholeExtent,int);
00054
00056
00058 vtkSetMacro(ConstantSize, int);
00059 vtkGetMacro(ConstantSize, int);
00060 vtkBooleanMacro(ConstantSize, int);
00062
00064
00067 void SetProjectionAxes(int x, int y, int z);
00068 void SetProjectionAxes(int a[3]) {this->SetProjectionAxes(a[0],a[1],a[2]);}
00069 vtkGetVector3Macro(ProjectionAxes, int);
00071
00073
00075 vtkSetVector4Macro(OriginCX, double);
00076
00077 vtkGetVector4Macro(OriginCX, double);
00079
00081
00083 vtkSetVector4Macro(SampleCX, double);
00084
00085 vtkGetVector4Macro(SampleCX, double);
00087
00089
00092 void SetSizeCX(double cReal, double cImag, double xReal, double xImag);
00093 double *GetSizeCX();
00094 void GetSizeCX(double s[4]);
00096
00098
00099 vtkSetClampMacro(MaximumNumberOfIterations, unsigned short, 1, 5000);
00100 vtkGetMacro(MaximumNumberOfIterations, unsigned short);
00102
00104
00106 void Zoom(double factor);
00107 void Pan(double x, double y, double z);
00109
00112 void CopyOriginAndSample(vtkImageMandelbrotSource *source);
00113
00115
00116 vtkSetClampMacro(SubsampleRate, int, 1, VTK_LARGE_INTEGER);
00117 vtkGetMacro(SubsampleRate, int);
00119
00120 protected:
00121 vtkImageMandelbrotSource();
00122 ~vtkImageMandelbrotSource();
00123
00124 int ProjectionAxes[3];
00125
00126
00127 int WholeExtent[6];
00128
00129
00130 double OriginCX[4];
00131
00132 double SampleCX[4];
00133 unsigned short MaximumNumberOfIterations;
00134
00135
00136
00137 double SizeCX[4];
00138
00139
00140 int ConstantSize;
00141
00142 int SubsampleRate;
00143
00144
00145 virtual int RequestData(vtkInformation *request,
00146 vtkInformationVector** inputVector,
00147 vtkInformationVector* outputVector);
00148
00149 virtual int RequestInformation (vtkInformation *,
00150 vtkInformationVector**,
00151 vtkInformationVector *);
00152 double EvaluateSet(double p[4]);
00153 private:
00154 vtkImageMandelbrotSource(const vtkImageMandelbrotSource&);
00155 void operator=(const vtkImageMandelbrotSource&);
00156 };
00157
00158
00159 #endif
00160
00161