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
00073 #ifndef __vtkSweptSurface_h
00074 #define __vtkSweptSurface_h
00075
00076 #include "vtkImageToImageFilter.h"
00077
00078 class vtkDataArray;
00079 class vtkMatrix4x4;
00080 class vtkTransform;
00081 class vtkTransformCollection;
00082
00083 class VTK_PATENTED_EXPORT vtkSweptSurface : public vtkImageToImageFilter
00084 {
00085 public:
00086 static vtkSweptSurface *New();
00087 vtkTypeRevisionMacro(vtkSweptSurface,vtkImageToImageFilter);
00088 void PrintSelf(ostream& os, vtkIndent indent);
00089
00091
00093 vtkSetVector3Macro(SampleDimensions,int);
00094 vtkGetVectorMacro(SampleDimensions,int,3);
00096
00098
00100 virtual void SetTransforms(vtkTransformCollection*);
00101 vtkGetObjectMacro(Transforms, vtkTransformCollection);
00103
00105
00108 vtkSetMacro(FillValue,float);
00109 vtkGetMacro(FillValue,float);
00111
00113
00123 vtkSetMacro(NumberOfInterpolationSteps,int);
00124 vtkGetMacro(NumberOfInterpolationSteps,int);
00126
00128
00131 vtkSetMacro(MaximumNumberOfInterpolationSteps,int);
00132 vtkGetMacro(MaximumNumberOfInterpolationSteps,int);
00134
00136
00141 vtkSetMacro(Capping,int);
00142 vtkGetMacro(Capping,int);
00143 vtkBooleanMacro(Capping,int);
00145
00147
00152 vtkSetVectorMacro(ModelBounds,float,6);
00153 vtkGetVectorMacro(ModelBounds,float,6);
00154 void SetModelBounds(float xmin, float xmax, float ymin, float ymax,
00155 float zmin, float zmax);
00157
00159
00163 vtkSetMacro(AdjustBounds,int);
00164 vtkGetMacro(AdjustBounds,int);
00165 vtkBooleanMacro(AdjustBounds,int);
00167
00169
00172 vtkSetClampMacro(AdjustDistance,float,-1.0,1.0);
00173 vtkGetMacro(AdjustDistance,float);
00175
00176
00177 unsigned long int GetMTime();
00178
00179 protected:
00180 vtkSweptSurface();
00181 ~vtkSweptSurface();
00182
00183 virtual void ExecuteData(vtkDataObject *);
00184 virtual void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
00185 void ExecuteInformation(){
00186 this->vtkImageToImageFilter::ExecuteInformation();};
00187 void ComputeInputUpdateExtent(int inExt[6], int outExt[6]);
00188
00189 void ComputeBounds(float origin[3], float ar[3], float bbox[24]);
00190 int ComputeNumberOfSteps(vtkTransform *t1, vtkTransform *t2, float bbox[24]);
00191 void SampleInput(vtkMatrix4x4 *m, int inDim[3], float inOrigin[3],
00192 float inAr[3], vtkDataArray *in, vtkDataArray *out);
00193 void ComputeFootprint (vtkMatrix4x4 *m, int inDim[3], float inOrigin[3],
00194 float inSpacing[3], int Indicies[6]);
00195 void Cap(vtkDataArray *s);
00196 void GetRelativePosition(vtkTransform &t, float *origin, float *position);
00197 vtkMatrix4x4* GetActorMatrixPointer(vtkTransform &t,
00198 float origin[3],
00199 float position[3], float orientation[3]);
00200 virtual void InterpolateStates(float *pos1, float *pos2, float *euler1,
00201 float *euler2, float t, float *posOut,
00202 float *eulerOut);
00203
00204 int SampleDimensions[3];
00205 float FillValue;
00206 float ModelBounds[6];
00207 int NumberOfInterpolationSteps;
00208 int MaximumNumberOfInterpolationSteps;
00209 int Capping;
00210 int AdjustBounds;
00211 float AdjustDistance;
00212
00213 vtkTransformCollection *Transforms;
00214
00215 private:
00216
00217 vtkTransform *T;
00218 private:
00219 vtkSweptSurface(const vtkSweptSurface&);
00220 void operator=(const vtkSweptSurface&);
00221 };
00222
00223 #endif