00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00022
00027
00035
00040
00043
00044 #ifndef __vtkPreciseHyperStreamline_h
00045 #define __vtkPreciseHyperStreamline_h
00046
00047 #include "vtkTeemConfigure.h"
00048
00049 #include "vtkDataSetToPolyDataFilter.h"
00050 #include "vtkInitialValueProblemSolver.h"
00051
00052 #define VTK_INTEGRATE_FORWARD 0
00053 #define VTK_INTEGRATE_BACKWARD 1
00054 #define VTK_INTEGRATE_BOTH_DIRECTIONS 2
00055
00056 #define VTK_INTEGRATE_MAJOR_EIGENVECTOR 0
00057 #define VTK_INTEGRATE_MEDIUM_EIGENVECTOR 1
00058 #define VTK_INTEGRATE_MINOR_EIGENVECTOR 2
00059
00060
00061 class vtkPreciseHyperArray;
00062
00063 class VTK_Teem_EXPORT vtkPreciseHyperStreamline : public vtkDataSetToPolyDataFilter
00064 {
00065 public:
00066 vtkTypeRevisionMacro(vtkPreciseHyperStreamline,vtkDataSetToPolyDataFilter);
00067 void PrintSelf(ostream& os, vtkIndent indent);
00068
00074 static vtkPreciseHyperStreamline *New();
00075
00079 void SetStartLocation(vtkIdType cellId, int subId, vtkFloatingPointType pcoords[3]);
00080
00084 void SetStartLocation(vtkIdType cellId, int subId, vtkFloatingPointType r, vtkFloatingPointType s,
00085 vtkFloatingPointType t);
00086
00090 vtkIdType GetStartLocation(int& subId, vtkFloatingPointType pcoords[3]);
00091
00096 void SetStartPosition(vtkFloatingPointType x[3]);
00097
00102 void SetStartPosition(vtkFloatingPointType x, vtkFloatingPointType y, vtkFloatingPointType z);
00103
00106 vtkFloatingPointType *GetStartPosition();
00107
00111 vtkSetClampMacro(MaximumPropagationDistance,vtkFloatingPointType,0.0,VTK_LARGE_FLOAT);
00112 vtkGetMacro(MaximumPropagationDistance,vtkFloatingPointType);
00113
00117 vtkSetClampMacro(MinimumPropagationDistance,vtkFloatingPointType,0.0,VTK_LARGE_FLOAT);
00118 vtkGetMacro(MinimumPropagationDistance,vtkFloatingPointType);
00119
00129 vtkSetClampMacro(IntegrationEigenvector,int,
00130 VTK_INTEGRATE_MAJOR_EIGENVECTOR,
00131 VTK_INTEGRATE_MINOR_EIGENVECTOR);
00132 vtkGetMacro(IntegrationEigenvector,int);
00133 void SetIntegrationEigenvectorToMajor()
00134 {this->SetIntegrationEigenvector(VTK_INTEGRATE_MAJOR_EIGENVECTOR);};
00135 void SetIntegrationEigenvectorToMedium()
00136 {this->SetIntegrationEigenvector(VTK_INTEGRATE_MEDIUM_EIGENVECTOR);};
00137 void SetIntegrationEigenvectorToMinor()
00138 {this->SetIntegrationEigenvector(VTK_INTEGRATE_MINOR_EIGENVECTOR);};
00139
00144 void IntegrateMajorEigenvector()
00145 {this->SetIntegrationEigenvectorToMajor();};
00146
00152 void IntegrateMediumEigenvector()
00153 {this->SetIntegrationEigenvectorToMedium();};
00154
00159 void IntegrateMinorEigenvector()
00160 {this->SetIntegrationEigenvectorToMinor();};
00161
00165 vtkSetClampMacro(IntegrationStepLength,vtkFloatingPointType,0.001,0.5);
00166 vtkGetMacro(IntegrationStepLength,vtkFloatingPointType);
00167
00172 vtkSetClampMacro(StepLength,vtkFloatingPointType,0.000001,1.0);
00173 vtkGetMacro(StepLength,vtkFloatingPointType);
00174
00175
00179
00180 void SetMethod(vtkInitialValueProblemSolver * meth)
00181 { method = meth; }
00182
00183 vtkInitialValueProblemSolver * GetMethod(void)
00184 { return method; }
00187 vtkSetClampMacro(IntegrationDirection,int,
00188 VTK_INTEGRATE_FORWARD,VTK_INTEGRATE_BOTH_DIRECTIONS);
00189 vtkGetMacro(IntegrationDirection,int);
00190 void SetIntegrationDirectionToForward()
00191 {this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD);};
00192 void SetIntegrationDirectionToBackward()
00193 {this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);};
00194 void SetIntegrationDirectionToIntegrateBothDirections()
00195 {this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);};
00196
00200 vtkSetClampMacro(TerminalEigenvalue,vtkFloatingPointType,0.0,VTK_LARGE_FLOAT);
00201 vtkGetMacro(TerminalEigenvalue,vtkFloatingPointType);
00202
00206 vtkSetClampMacro(TerminalFractionalAnisotropy,vtkFloatingPointType,0.0,1.0);
00207 vtkGetMacro(TerminalFractionalAnisotropy,vtkFloatingPointType);
00208
00211 vtkSetClampMacro(MinStep,vtkFloatingPointType,0,VTK_LARGE_FLOAT);
00212 vtkGetMacro(MinStep,vtkFloatingPointType);
00213
00216 vtkSetClampMacro(MaxStep,vtkFloatingPointType,0,VTK_LARGE_FLOAT);
00217 vtkGetMacro(MaxStep,vtkFloatingPointType);
00218
00221 vtkSetClampMacro(MaxAngle,vtkFloatingPointType,0,1);
00222 vtkGetMacro(MaxAngle,vtkFloatingPointType);
00223
00226 vtkSetClampMacro(LengthOfMaxAngle,vtkFloatingPointType,0,VTK_LARGE_FLOAT);
00227 vtkGetMacro(LengthOfMaxAngle,vtkFloatingPointType);
00228
00231 vtkSetClampMacro(MaxError,vtkFloatingPointType,0.0000000001,VTK_LARGE_FLOAT);
00232 vtkGetMacro(MaxError,vtkFloatingPointType);
00233
00237 vtkSetClampMacro(NumberOfSides,int,3,VTK_LARGE_INTEGER);
00238 vtkGetMacro(NumberOfSides,int);
00239
00245 vtkSetClampMacro(Radius,vtkFloatingPointType,0.0001,VTK_LARGE_FLOAT);
00246 vtkGetMacro(Radius,vtkFloatingPointType);
00247
00251 vtkSetMacro(LogScaling,int);
00252 vtkGetMacro(LogScaling,int);
00253 vtkBooleanMacro(LogScaling,int);
00254
00255 protected:
00256 vtkPreciseHyperStreamline();
00257 ~vtkPreciseHyperStreamline();
00258
00260 void Execute();
00261 void BuildTube();
00262
00264 int StartFrom;
00265
00267 vtkIdType StartCell;
00268 int StartSubId;
00269 vtkFloatingPointType StartPCoords[3];
00270
00272 vtkFloatingPointType StartPosition[3];
00273
00275 vtkInitialValueProblemSolver * method;
00276
00278 vtkFloatingPointType MinStep;
00279
00281 vtkFloatingPointType MaxStep;
00282
00284 vtkFloatingPointType MaxError;
00285
00286
00287 vtkPreciseHyperArray *Streamers;
00288 int NumberOfStreamers;
00289
00291 vtkFloatingPointType MaximumPropagationDistance;
00292
00294 vtkFloatingPointType MinimumPropagationDistance;
00295
00297 int IntegrationDirection;
00298
00300 vtkFloatingPointType IntegrationStepLength;
00301
00303 vtkFloatingPointType StepLength;
00304
00306 vtkFloatingPointType MaxAngle;
00307
00309 vtkFloatingPointType LengthOfMaxAngle;
00310
00312 vtkFloatingPointType TerminalEigenvalue;
00313
00315 vtkFloatingPointType TerminalFractionalAnisotropy;
00316
00318 vtkFloatingPointType RegularizationBias;
00319
00321 int NumberOfSides;
00322
00324 vtkFloatingPointType Radius;
00325
00327 int LogScaling;
00328
00330 int IntegrationEigenvector;
00331 private:
00332 vtkPreciseHyperStreamline(const vtkPreciseHyperStreamline&);
00333 void operator=(const vtkPreciseHyperStreamline&);
00334 };
00335
00336 #endif
00337
00338