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
00082 #ifndef __vtkSweptSurface_h
00083 #define __vtkSweptSurface_h
00084
00085 #include "vtkStructuredPointsToStructuredPointsFilter.h"
00086 #include "vtkTransformCollection.h"
00087
00088 class VTK_EXPORT vtkSweptSurface : public vtkStructuredPointsToStructuredPointsFilter
00089 {
00090 public:
00091 static vtkSweptSurface *New();
00092 vtkTypeMacro(vtkSweptSurface,vtkStructuredPointsToStructuredPointsFilter);
00093 void PrintSelf(ostream& os, vtkIndent indent);
00094
00097 vtkSetVector3Macro(SampleDimensions,int);
00098 vtkGetVectorMacro(SampleDimensions,int,3);
00099
00102 vtkSetObjectMacro(Transforms, vtkTransformCollection);
00103 vtkGetObjectMacro(Transforms, vtkTransformCollection);
00104
00108 vtkSetMacro(FillValue,float);
00109 vtkGetMacro(FillValue,float);
00110
00121 vtkSetMacro(NumberOfInterpolationSteps,int);
00122 vtkGetMacro(NumberOfInterpolationSteps,int);
00123
00127 vtkSetMacro(MaximumNumberOfInterpolationSteps,int);
00128 vtkGetMacro(MaximumNumberOfInterpolationSteps,int);
00129
00135 vtkSetMacro(Capping,int);
00136 vtkGetMacro(Capping,int);
00137 vtkBooleanMacro(Capping,int);
00138
00144 vtkSetVectorMacro(ModelBounds,float,6);
00145 vtkGetVectorMacro(ModelBounds,float,6);
00146 void SetModelBounds(float xmin, float xmax, float ymin, float ymax,
00147 float zmin, float zmax);
00148
00153 vtkSetMacro(AdjustBounds,int);
00154 vtkGetMacro(AdjustBounds,int);
00155 vtkBooleanMacro(AdjustBounds,int);
00156
00160 vtkSetClampMacro(AdjustDistance,float,-1.0,1.0);
00161 vtkGetMacro(AdjustDistance,float);
00162
00163
00164 unsigned long int GetMTime();
00165
00166 protected:
00167 vtkSweptSurface();
00168 ~vtkSweptSurface();
00169 vtkSweptSurface(const vtkSweptSurface&) {};
00170 void operator=(const vtkSweptSurface&) {};
00171
00172 void Execute();
00173
00174 void ComputeBounds(float origin[3], float ar[3], float bbox[24]);
00175 int ComputeNumberOfSteps(vtkTransform *t1, vtkTransform *t2, float bbox[24]);
00176 void SampleInput(vtkMatrix4x4 *m, int inDim[3], float inOrigin[3],
00177 float inAr[3], vtkScalars *in, vtkScalars *out);
00178 void ComputeFootprint (vtkMatrix4x4 *m, int inDim[3], float inOrigin[3],
00179 float inSpacing[3], int Indicies[6]);
00180 void Cap(vtkScalars *s);
00181 void GetRelativePosition(vtkTransform &t, float *origin, float *position);
00182 vtkMatrix4x4* GetActorMatrixPointer(vtkTransform &t,
00183 float origin[3],
00184 float position[3], float orientation[3]);
00185 virtual void InterpolateStates(float *pos1, float *pos2, float *euler1,
00186 float *euler2, float t, float *posOut, float *eulerOut);
00187
00188 int SampleDimensions[3];
00189 float FillValue;
00190 float ModelBounds[6];
00191 int NumberOfInterpolationSteps;
00192 int MaximumNumberOfInterpolationSteps;
00193 int Capping;
00194 int AdjustBounds;
00195 float AdjustDistance;
00196
00197 vtkTransformCollection *Transforms;
00198
00199 private:
00200
00201 vtkTransform *T;
00202 };
00203
00204 #endif
00205
00206