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
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00084 #ifndef __vtkSweptSurface_h
00085 #define __vtkSweptSurface_h
00086
00087 #include "vtkStructuredPointsToStructuredPointsFilter.h"
00088 #include "vtkTransformCollection.h"
00089
00090 class VTK_PATENTED_EXPORT vtkSweptSurface : public vtkStructuredPointsToStructuredPointsFilter
00091 {
00092 public:
00093 static vtkSweptSurface *New();
00094 vtkTypeMacro(vtkSweptSurface,vtkStructuredPointsToStructuredPointsFilter);
00095 void PrintSelf(ostream& os, vtkIndent indent);
00096
00098
00100 vtkSetVector3Macro(SampleDimensions,int);
00101 vtkGetVectorMacro(SampleDimensions,int,3);
00103
00105
00107 vtkSetObjectMacro(Transforms, vtkTransformCollection);
00108 vtkGetObjectMacro(Transforms, vtkTransformCollection);
00110
00112
00115 vtkSetMacro(FillValue,float);
00116 vtkGetMacro(FillValue,float);
00118
00120
00130 vtkSetMacro(NumberOfInterpolationSteps,int);
00131 vtkGetMacro(NumberOfInterpolationSteps,int);
00133
00135
00138 vtkSetMacro(MaximumNumberOfInterpolationSteps,int);
00139 vtkGetMacro(MaximumNumberOfInterpolationSteps,int);
00141
00143
00148 vtkSetMacro(Capping,int);
00149 vtkGetMacro(Capping,int);
00150 vtkBooleanMacro(Capping,int);
00152
00154
00159 vtkSetVectorMacro(ModelBounds,float,6);
00160 vtkGetVectorMacro(ModelBounds,float,6);
00161 void SetModelBounds(float xmin, float xmax, float ymin, float ymax,
00162 float zmin, float zmax);
00164
00166
00170 vtkSetMacro(AdjustBounds,int);
00171 vtkGetMacro(AdjustBounds,int);
00172 vtkBooleanMacro(AdjustBounds,int);
00174
00176
00179 vtkSetClampMacro(AdjustDistance,float,-1.0,1.0);
00180 vtkGetMacro(AdjustDistance,float);
00182
00183
00184 unsigned long int GetMTime();
00185
00186 protected:
00187 vtkSweptSurface();
00188 ~vtkSweptSurface();
00189
00190 void Execute();
00191 void ExecuteInformation();
00192
00193 void ComputeBounds(float origin[3], float ar[3], float bbox[24]);
00194 int ComputeNumberOfSteps(vtkTransform *t1, vtkTransform *t2, float bbox[24]);
00195 void SampleInput(vtkMatrix4x4 *m, int inDim[3], float inOrigin[3],
00196 float inAr[3], vtkDataArray *in, vtkDataArray *out);
00197 void ComputeFootprint (vtkMatrix4x4 *m, int inDim[3], float inOrigin[3],
00198 float inSpacing[3], int Indicies[6]);
00199 void Cap(vtkDataArray *s);
00200 void GetRelativePosition(vtkTransform &t, float *origin, float *position);
00201 vtkMatrix4x4* GetActorMatrixPointer(vtkTransform &t,
00202 float origin[3],
00203 float position[3], float orientation[3]);
00204 virtual void InterpolateStates(float *pos1, float *pos2, float *euler1,
00205 float *euler2, float t, float *posOut,
00206 float *eulerOut);
00207
00208 int SampleDimensions[3];
00209 float FillValue;
00210 float ModelBounds[6];
00211 int NumberOfInterpolationSteps;
00212 int MaximumNumberOfInterpolationSteps;
00213 int Capping;
00214 int AdjustBounds;
00215 float AdjustDistance;
00216
00217 vtkTransformCollection *Transforms;
00218
00219 private:
00220
00221 vtkTransform *T;
00222 private:
00223 vtkSweptSurface(const vtkSweptSurface&);
00224 void operator=(const vtkSweptSurface&);
00225 };
00226
00227 #endif