00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
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
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
00214 vtkTransform *T;
00215 private:
00216 vtkSweptSurface(const vtkSweptSurface&);
00217 void operator=(const vtkSweptSurface&);
00218 };
00219
00220 #endif