VTK
vtkSampleFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSampleFunction.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
30 #ifndef vtkSampleFunction_h
31 #define vtkSampleFunction_h
32 
33 #include "vtkImagingHybridModule.h" // For export macro
34 #include "vtkImageAlgorithm.h"
35 
37 class vtkDataArray;
38 
39 class VTKIMAGINGHYBRID_EXPORT vtkSampleFunction : public vtkImageAlgorithm
40 {
41 public:
43  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
44 
49  static vtkSampleFunction *New();
50 
52 
55  virtual void SetImplicitFunction(vtkImplicitFunction*);
56  vtkGetObjectMacro(ImplicitFunction,vtkImplicitFunction);
58 
60 
63  vtkSetMacro(OutputScalarType,int);
64  vtkGetMacro(OutputScalarType,int);
66  {this->SetOutputScalarType(VTK_DOUBLE);}
68  {this->SetOutputScalarType(VTK_FLOAT);}
70  {this->SetOutputScalarType(VTK_LONG);}
72  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
74  {this->SetOutputScalarType(VTK_INT);}
76  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
78  {this->SetOutputScalarType(VTK_SHORT);}
80  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
82  {this->SetOutputScalarType(VTK_CHAR);}
84  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
86 
90  void SetSampleDimensions(int i, int j, int k);
91 
93 
96  void SetSampleDimensions(int dim[3]);
97  vtkGetVectorMacro(SampleDimensions,int,3);
99 
101 
105  void SetModelBounds(const double bounds[6]);
106  void SetModelBounds(double xMin, double xMax,
107  double yMin, double yMax,
108  double zMin, double zMax);
109  vtkGetVectorMacro(ModelBounds,double,6);
111 
113 
118  vtkSetMacro(Capping,int);
119  vtkGetMacro(Capping,int);
120  vtkBooleanMacro(Capping,int);
122 
124 
127  vtkSetMacro(CapValue,double);
128  vtkGetMacro(CapValue,double);
130 
132 
135  vtkSetMacro(ComputeNormals,int);
136  vtkGetMacro(ComputeNormals,int);
137  vtkBooleanMacro(ComputeNormals,int);
139 
141 
145  vtkSetStringMacro(ScalarArrayName);
146  vtkGetStringMacro(ScalarArrayName);
148 
150 
154  vtkSetStringMacro(NormalArrayName);
155  vtkGetStringMacro(NormalArrayName);
157 
161  vtkMTimeType GetMTime() VTK_OVERRIDE;
162 
163 protected:
172 
173  ~vtkSampleFunction() VTK_OVERRIDE;
174 
175  void ReportReferences(vtkGarbageCollector*) VTK_OVERRIDE;
176 
177  void ExecuteDataWithInformation(vtkDataObject *, vtkInformation *) VTK_OVERRIDE;
178  int RequestInformation (vtkInformation *,
180  vtkInformationVector *) VTK_OVERRIDE;
181  void Cap(vtkDataArray *s);
182 
183  int OutputScalarType;
184  int SampleDimensions[3];
185  double ModelBounds[6];
186  int Capping;
187  double CapValue;
188  vtkImplicitFunction *ImplicitFunction;
189  int ComputeNormals;
190  char *ScalarArrayName;
191  char *NormalArrayName;
192 
193 private:
194  vtkSampleFunction(const vtkSampleFunction&) VTK_DELETE_FUNCTION;
195  void operator=(const vtkSampleFunction&) VTK_DELETE_FUNCTION;
196 };
197 
198 #endif
199 
200 
abstract interface for implicit functions
sample an implicit function over a structured point set
#define VTK_UNSIGNED_INT
Definition: vtkType.h:55
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:53
Detect and break reference loops.
#define VTK_DOUBLE
Definition: vtkType.h:59
void SetOutputScalarTypeToShort()
Set what type of scalar data this source should generate.
#define VTK_FLOAT
Definition: vtkType.h:58
void SetOutputScalarTypeToUnsignedShort()
Set what type of scalar data this source should generate.
void SetOutputScalarTypeToDouble()
Set what type of scalar data this source should generate.
a simple class to control print indentation
Definition: vtkIndent.h:33
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
virtual vtkMTimeType GetMTime()
Return this object's modified time.
#define VTK_SHORT
Definition: vtkType.h:52
void SetOutputScalarTypeToLong()
Set what type of scalar data this source should generate.
#define VTK_CHAR
Definition: vtkType.h:49
#define VTK_LONG
Definition: vtkType.h:56
void SetOutputScalarTypeToInt()
Set what type of scalar data this source should generate.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
void SetOutputScalarTypeToUnsignedLong()
Set what type of scalar data this source should generate.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetOutputScalarTypeToUnsignedChar()
Set what type of scalar data this source should generate.
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:51
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:57
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetOutputScalarTypeToFloat()
Set what type of scalar data this source should generate.
general representation of visualization data
Definition: vtkDataObject.h:58
void SetOutputScalarTypeToUnsignedInt()
Set what type of scalar data this source should generate.
#define VTK_INT
Definition: vtkType.h:54
void SetOutputScalarTypeToChar()
Set what type of scalar data this source should generate.