00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00032 #ifndef __vtkImageMandelbrotSource_h
00033 #define __vtkImageMandelbrotSource_h
00034
00035 #include "vtkImageAlgorithm.h"
00036
00037 class VTK_IMAGING_EXPORT vtkImageMandelbrotSource : public vtkImageAlgorithm
00038 {
00039 public:
00040 static vtkImageMandelbrotSource *New();
00041 vtkTypeRevisionMacro(vtkImageMandelbrotSource,vtkImageAlgorithm);
00042 void PrintSelf(ostream& os, vtkIndent indent);
00043
00045
00046 void SetWholeExtent(int extent[6]);
00047 void SetWholeExtent(int minX, int maxX, int minY, int maxY,
00048 int minZ, int maxZ);
00049 vtkGetVector6Macro(WholeExtent,int);
00051
00053
00055 vtkSetMacro(ConstantSize, int);
00056 vtkGetMacro(ConstantSize, int);
00057 vtkBooleanMacro(ConstantSize, int);
00059
00061
00064 void SetProjectionAxes(int x, int y, int z);
00065 void SetProjectionAxes(int a[3]) {this->SetProjectionAxes(a[0],a[1],a[2]);}
00066 vtkGetVector3Macro(ProjectionAxes, int);
00068
00070
00072 vtkSetVector4Macro(OriginCX, double);
00073
00074 vtkGetVector4Macro(OriginCX, double);
00076
00078
00080 vtkSetVector4Macro(SampleCX, double);
00081
00082 vtkGetVector4Macro(SampleCX, double);
00084
00086
00089 void SetSizeCX(double cReal, double cImag, double xReal, double xImag);
00090 double *GetSizeCX();
00091 void GetSizeCX(double s[4]);
00093
00095
00096 vtkSetClampMacro(MaximumNumberOfIterations, unsigned short,
00097 static_cast<unsigned short>(1),
00098 static_cast<unsigned short>(5000));
00099 vtkGetMacro(MaximumNumberOfIterations, unsigned short);
00101
00103
00105 void Zoom(double factor);
00106 void Pan(double x, double y, double z);
00108
00111 void CopyOriginAndSample(vtkImageMandelbrotSource *source);
00112
00114
00115 vtkSetClampMacro(SubsampleRate, int, 1, VTK_LARGE_INTEGER);
00116 vtkGetMacro(SubsampleRate, int);
00118
00119 protected:
00120 vtkImageMandelbrotSource();
00121 ~vtkImageMandelbrotSource();
00122
00123 int ProjectionAxes[3];
00124
00125
00126 int WholeExtent[6];
00127
00128
00129 double OriginCX[4];
00130
00131 double SampleCX[4];
00132 unsigned short MaximumNumberOfIterations;
00133
00134
00135
00136 double SizeCX[4];
00137
00138
00139 int ConstantSize;
00140
00141 int SubsampleRate;
00142
00143
00144 virtual int RequestData(vtkInformation *request,
00145 vtkInformationVector** inputVector,
00146 vtkInformationVector* outputVector);
00147
00148 virtual int RequestInformation (vtkInformation *,
00149 vtkInformationVector**,
00150 vtkInformationVector *);
00151 double EvaluateSet(double p[4]);
00152 private:
00153 vtkImageMandelbrotSource(const vtkImageMandelbrotSource&);
00154 void operator=(const vtkImageMandelbrotSource&);
00155 };
00156
00157
00158 #endif
00159
00160