00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00073
#ifndef __vtkGaussianSplatter_h
00074
#define __vtkGaussianSplatter_h
00075
00076
#include "vtkDataSetToImageFilter.h"
00077
00078 #define VTK_ACCUMULATION_MODE_MIN 0
00079 #define VTK_ACCUMULATION_MODE_MAX 1
00080 #define VTK_ACCUMULATION_MODE_SUM 2
00081
00082
class vtkDoubleArray;
00083
00084 class VTK_IMAGING_EXPORT vtkGaussianSplatter :
public vtkDataSetToImageFilter
00085 {
00086
public:
00087 vtkTypeRevisionMacro(vtkGaussianSplatter,
vtkDataSetToImageFilter);
00088
void PrintSelf(ostream& os,
vtkIndent indent);
00089
00093
static vtkGaussianSplatter *
New();
00094
00096
00098
void SetSampleDimensions(
int i,
int j,
int k);
00099
void SetSampleDimensions(
int dim[3]);
00100 vtkGetVectorMacro(SampleDimensions,
int,3);
00102
00104
00108 vtkSetVector6Macro(ModelBounds,
double);
00109 vtkGetVectorMacro(ModelBounds,
double,6);
00111
00113
00116 vtkSetClampMacro(Radius,
double,0.0,1.0);
00117 vtkGetMacro(Radius,
double);
00119
00121
00124 vtkSetClampMacro(ScaleFactor,
double,0.0,VTK_DOUBLE_MAX);
00125 vtkGetMacro(ScaleFactor,
double);
00127
00129
00131 vtkSetMacro(ExponentFactor,
double);
00132 vtkGetMacro(ExponentFactor,
double);
00134
00136
00139 vtkSetMacro(NormalWarping,
int);
00140 vtkGetMacro(NormalWarping,
int);
00141 vtkBooleanMacro(NormalWarping,
int);
00143
00145
00150 vtkSetClampMacro(Eccentricity,
double,0.001,VTK_DOUBLE_MAX);
00151 vtkGetMacro(Eccentricity,
double);
00153
00155
00156 vtkSetMacro(ScalarWarping,
int);
00157 vtkGetMacro(ScalarWarping,
int);
00158 vtkBooleanMacro(ScalarWarping,
int);
00160
00162
00165 vtkSetMacro(Capping,
int);
00166 vtkGetMacro(Capping,
int);
00167 vtkBooleanMacro(Capping,
int);
00169
00171
00173 vtkSetMacro(CapValue,
double);
00174 vtkGetMacro(CapValue,
double);
00176
00178
00182 vtkSetClampMacro(AccumulationMode,
int,
00183 VTK_ACCUMULATION_MODE_MIN,VTK_ACCUMULATION_MODE_SUM);
00184 vtkGetMacro(AccumulationMode,
int);
00185 void SetAccumulationModeToMin()
00186 {this->SetAccumulationMode(
VTK_ACCUMULATION_MODE_MIN);}
00187 void SetAccumulationModeToMax()
00188 {this->SetAccumulationMode(
VTK_ACCUMULATION_MODE_MAX);}
00189 void SetAccumulationModeToSum()
00190 {this->SetAccumulationMode(
VTK_ACCUMULATION_MODE_SUM);}
00191
const char *GetAccumulationModeAsString();
00193
00195
00198 vtkSetMacro(NullValue,
double);
00199 vtkGetMacro(NullValue,
double);
00201
00204
void ComputeModelBounds();
00205
00206
protected:
00207 vtkGaussianSplatter();
00208 ~vtkGaussianSplatter() {};
00209
00210
virtual void ExecuteInformation();
00211
virtual void ExecuteData(
vtkDataObject *);
00212
void Cap(
vtkDoubleArray *s);
00213
00214 int SampleDimensions[3];
00215 double Radius;
00216 double ExponentFactor;
00217 double ModelBounds[6];
00218 int NormalWarping;
00219 double Eccentricity;
00220 int ScalarWarping;
00221 double ScaleFactor;
00222 int Capping;
00223 double CapValue;
00224 int AccumulationMode;
00225
00226
double Gaussian(
double x[3]);
00227
double EccentricGaussian(
double x[3]);
00228 double ScalarSampling(
double s)
00229 {
return this->ScaleFactor * s;}
00230 double PositionSampling(
double)
00231 {
return this->ScaleFactor;}
00232
void SetScalar(
int idx,
double dist2,
vtkDoubleArray *newScalars);
00233
00234
00235
private:
00236
double Radius2;
00237 double (vtkGaussianSplatter::*Sample)(
double x[3]);
00238 double (vtkGaussianSplatter::*SampleFactor)(
double s);
00239
char *Visited;
00240
double Eccentricity2;
00241
double *P;
00242
double *N;
00243
double S;
00244
double Origin[3];
00245
double Spacing[3];
00246
double SplatDistance[3];
00247
double NullValue;
00248
00249
00250
private:
00251 vtkGaussianSplatter(
const vtkGaussianSplatter&);
00252
void operator=(
const vtkGaussianSplatter&);
00253 };
00254
00255
#endif
00256
00257