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
00075 #ifndef __vtkTubeFilter_h
00076 #define __vtkTubeFilter_h
00077
00078 #include "vtkPolyDataToPolyDataFilter.h"
00079
00080 #define VTK_VARY_RADIUS_OFF 0
00081 #define VTK_VARY_RADIUS_BY_SCALAR 1
00082 #define VTK_VARY_RADIUS_BY_VECTOR 2
00083
00084 class VTK_EXPORT vtkTubeFilter : public vtkPolyDataToPolyDataFilter
00085 {
00086 public:
00087 vtkTypeMacro(vtkTubeFilter,vtkPolyDataToPolyDataFilter);
00088 void PrintSelf(ostream& os, vtkIndent indent);
00089
00092 static vtkTubeFilter *New();
00093
00096 vtkSetClampMacro(Radius,float,0.0,VTK_LARGE_FLOAT);
00097 vtkGetMacro(Radius,float);
00098
00100 vtkSetClampMacro(VaryRadius,int,
00101 VTK_VARY_RADIUS_OFF,VTK_VARY_RADIUS_BY_VECTOR);
00102 vtkGetMacro(VaryRadius,int);
00103 void SetVaryRadiusToVaryRadiusOff()
00104 {this->SetVaryRadius(VTK_VARY_RADIUS_OFF);};
00105 void SetVaryRadiusToVaryRadiusByScalar()
00106 {this->SetVaryRadius(VTK_VARY_RADIUS_BY_SCALAR);};
00107 void SetVaryRadiusToVaryRadiusByVector()
00108 {this->SetVaryRadius(VTK_VARY_RADIUS_BY_VECTOR);};
00109 const char *GetVaryRadiusAsString();
00110
00113 vtkSetClampMacro(NumberOfSides,int,3,VTK_LARGE_INTEGER);
00114 vtkGetMacro(NumberOfSides,int);
00115
00118 vtkSetMacro(RadiusFactor,float);
00119 vtkGetMacro(RadiusFactor,float);
00120
00123 vtkSetVector3Macro(DefaultNormal,float);
00124 vtkGetVectorMacro(DefaultNormal,float,3);
00125
00128 vtkSetMacro(UseDefaultNormal,int);
00129 vtkGetMacro(UseDefaultNormal,int);
00130 vtkBooleanMacro(UseDefaultNormal,int);
00131
00133 vtkSetMacro(Capping,int);
00134 vtkGetMacro(Capping,int);
00135 vtkBooleanMacro(Capping,int);
00136
00139 vtkSetClampMacro(OnRatio,int,1,VTK_LARGE_INTEGER);
00140 vtkGetMacro(OnRatio,int);
00141
00145 vtkSetClampMacro(Offset,int,0,VTK_LARGE_INTEGER);
00146 vtkGetMacro(Offset,int);
00147
00148 protected:
00149 vtkTubeFilter();
00150 ~vtkTubeFilter() {};
00151 vtkTubeFilter(const vtkTubeFilter&) {};
00152 void operator=(const vtkTubeFilter&) {};
00153
00154
00155 void Execute();
00156
00157 float Radius;
00158 int VaryRadius;
00159 int NumberOfSides;
00160 float RadiusFactor;
00161 float DefaultNormal[3];
00162 int UseDefaultNormal;
00163 int Capping;
00164 int OnRatio;
00165 int Offset;
00166
00167 };
00168
00170 inline const char *vtkTubeFilter::GetVaryRadiusAsString(void)
00171 {
00172 if ( this->VaryRadius == VTK_VARY_RADIUS_OFF )
00173 {
00174 return "VaryRadiusOff";
00175 }
00176 else if ( this->VaryRadius == VTK_VARY_RADIUS_BY_SCALAR )
00177 {
00178 return "VaryRadiusByScalar";
00179 }
00180 else
00181 {
00182 return "VaryRadiusByVector";
00183 }
00184 }
00185
00186
00187 #endif
00188
00189