Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkImageMandelbrotSource.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageMandelbrotSource.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00046 #ifndef __vtkImageMandelbrotSource_h
00047 #define __vtkImageMandelbrotSource_h
00048 
00049 #include "vtkImageAlgorithm.h"
00050 
00051 class VTK_IMAGING_EXPORT vtkImageMandelbrotSource : public vtkImageAlgorithm
00052 {
00053 public:
00054   static vtkImageMandelbrotSource *New();
00055   vtkTypeRevisionMacro(vtkImageMandelbrotSource,vtkImageAlgorithm);
00056   void PrintSelf(ostream& os, vtkIndent indent);   
00057   
00059 
00060   void SetWholeExtent(int extent[6]);
00061   void SetWholeExtent(int minX, int maxX, int minY, int maxY, 
00062                             int minZ, int maxZ);
00063   vtkGetVector6Macro(WholeExtent,int);
00065   
00067 
00069   vtkSetMacro(ConstantSize, int);
00070   vtkGetMacro(ConstantSize, int);
00071   vtkBooleanMacro(ConstantSize, int);
00073 
00075 
00078   void SetProjectionAxes(int x, int y, int z);
00079   void SetProjectionAxes(int a[3]) {this->SetProjectionAxes(a[0],a[1],a[2]);}
00080   vtkGetVector3Macro(ProjectionAxes, int);
00082 
00084 
00086   vtkSetVector4Macro(OriginCX, double);
00087   //void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
00088   vtkGetVector4Macro(OriginCX, double);
00090 
00092 
00094   vtkSetVector4Macro(SampleCX, double);
00095   //void SetOriginCX(double cReal, double cImag, double xReal, double xImag);
00096   vtkGetVector4Macro(SampleCX, double);
00098 
00100 
00103   void SetSizeCX(double cReal, double cImag, double xReal, double xImag);
00104   double *GetSizeCX();
00105   void GetSizeCX(double s[4]);
00107 
00109 
00110   vtkSetClampMacro(MaximumNumberOfIterations, unsigned short, 1, 5000);
00111   vtkGetMacro(MaximumNumberOfIterations, unsigned short);
00113 
00115 
00117   void Zoom(double factor);
00118   void Pan(double x, double y, double z);
00120 
00123   void CopyOriginAndSample(vtkImageMandelbrotSource *source); 
00124 
00125 protected:
00126   vtkImageMandelbrotSource();
00127   ~vtkImageMandelbrotSource();
00128 
00129   int ProjectionAxes[3];
00130 
00131   // WholeExtent in 3 space (after projection).
00132   int WholeExtent[6];
00133 
00134   // Complex constant/initial-value at origin.
00135   double OriginCX[4];
00136   // Initial complex value at origin.
00137   double SampleCX[4];
00138   unsigned short MaximumNumberOfIterations;
00139 
00140   // A temporary vector that is computed as needed.
00141   // It is used to return a vector.
00142   double SizeCX[4];
00143 
00144   // A flag for keeping size constant (vs. keeping the spacing).
00145   int ConstantSize;
00146 
00147   virtual void ExecuteData(vtkDataObject *outData);
00148   virtual void ExecuteInformation (vtkInformation *, vtkInformationVector *, vtkInformationVector *);
00149   double EvaluateSet(double p[4]);
00150 private:
00151   vtkImageMandelbrotSource(const vtkImageMandelbrotSource&);  // Not implemented.
00152   void operator=(const vtkImageMandelbrotSource&);  // Not implemented.
00153 };
00154 
00155 
00156 #endif
00157 
00158