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

vtkSweptSurface.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkSweptSurface.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 
00015      THIS CLASS IS PATENTED UNDER UNITED STATES PATENT NUMBER 5,542,036
00016      "Implicit Modeling of Swept Volumes and Swept Surfaces"
00017      Application of this software for commercial purposes requires 
00018      a license grant from GE. Contact:
00019 
00020          Carl B. Horton
00021          Sr. Counsel, Intellectual Property
00022          3000 N. Grandview Blvd., W-710
00023          Waukesha, WI  53188
00024          Phone:  (262) 513-4022
00025          E-Mail: [email protected]
00026 
00027      for more information.
00028 
00029 =========================================================================*/
00070 #ifndef __vtkSweptSurface_h
00071 #define __vtkSweptSurface_h
00072 
00073 #include "vtkImageToImageFilter.h"
00074 
00075 class vtkDataArray;
00076 class vtkMatrix4x4;
00077 class vtkTransform;
00078 class vtkTransformCollection;
00079 
00080 class VTK_PATENTED_EXPORT vtkSweptSurface : public vtkImageToImageFilter
00081 {
00082 public:
00083   static vtkSweptSurface *New();
00084   vtkTypeRevisionMacro(vtkSweptSurface,vtkImageToImageFilter);
00085   void PrintSelf(ostream& os, vtkIndent indent);
00086 
00088 
00090   vtkSetVector3Macro(SampleDimensions,int);
00091   vtkGetVectorMacro(SampleDimensions,int,3);
00093 
00095 
00097   virtual void SetTransforms(vtkTransformCollection*);
00098   vtkGetObjectMacro(Transforms, vtkTransformCollection);
00100 
00102 
00105   vtkSetMacro(FillValue,double);
00106   vtkGetMacro(FillValue,double);
00108 
00110 
00120   vtkSetMacro(NumberOfInterpolationSteps,int);
00121   vtkGetMacro(NumberOfInterpolationSteps,int);
00123 
00125 
00128   vtkSetMacro(MaximumNumberOfInterpolationSteps,int);
00129   vtkGetMacro(MaximumNumberOfInterpolationSteps,int);
00131 
00133 
00138   vtkSetMacro(Capping,int);
00139   vtkGetMacro(Capping,int);
00140   vtkBooleanMacro(Capping,int);
00142   
00144 
00149   vtkSetVectorMacro(ModelBounds,double,6);
00150   vtkGetVectorMacro(ModelBounds,double,6);
00151   void SetModelBounds(double xmin, double xmax, double ymin, double ymax, 
00152                       double zmin, double zmax);
00154 
00156 
00160   vtkSetMacro(AdjustBounds,int);
00161   vtkGetMacro(AdjustBounds,int);
00162   vtkBooleanMacro(AdjustBounds,int);
00164   
00166 
00169   vtkSetClampMacro(AdjustDistance,double,-1.0,1.0);
00170   vtkGetMacro(AdjustDistance,double);
00172 
00173   //overload to check transformation matrices
00174   unsigned long int GetMTime();
00175 
00176 protected:
00177   vtkSweptSurface();
00178   ~vtkSweptSurface();
00179 
00180   virtual void ExecuteData(vtkDataObject *);
00181   virtual void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
00182   void ExecuteInformation(){
00183     this->vtkImageToImageFilter::ExecuteInformation();};
00184   void ComputeInputUpdateExtent(int inExt[6], int outExt[6]);
00185 
00186   void ComputeBounds(double origin[3], double ar[3], double bbox[24]);
00187   int ComputeNumberOfSteps(vtkTransform *t1, vtkTransform *t2, double bbox[24]);
00188   void SampleInput(vtkMatrix4x4 *m, int inDim[3], double inOrigin[3],
00189                    double inAr[3], vtkDataArray *in, vtkDataArray *out);
00190   void ComputeFootprint (vtkMatrix4x4 *m, int inDim[3], double inOrigin[3],
00191                          double inSpacing[3], int Indicies[6]);
00192   void Cap(vtkDataArray *s);
00193   void GetRelativePosition(vtkTransform &t, double *origin, double *position);
00194   vtkMatrix4x4* GetActorMatrixPointer(vtkTransform &t,
00195                                       double origin[3],
00196                                      double position[3], double orientation[3]);
00197   virtual void InterpolateStates(double *pos1, double *pos2, double *euler1, 
00198                                  double *euler2, double t, double *posOut,
00199                                  double *eulerOut);
00200 
00201   int SampleDimensions[3];
00202   double FillValue;
00203   double ModelBounds[6];
00204   int NumberOfInterpolationSteps;
00205   int MaximumNumberOfInterpolationSteps;
00206   int Capping;
00207   int AdjustBounds;
00208   double AdjustDistance;
00209 
00210   vtkTransformCollection *Transforms;
00211 
00212 private:
00213   //used to perform computations
00214   vtkTransform *T;
00215 private:
00216   vtkSweptSurface(const vtkSweptSurface&);  // Not implemented.
00217   void operator=(const vtkSweptSurface&);  // Not implemented.
00218 };
00219 
00220 #endif