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 =========================================================================*/
36 #ifndef vtkSampleFunction_h
37 #define vtkSampleFunction_h
38 
39 #include "vtkImagingHybridModule.h" // For export macro
40 #include "vtkImageAlgorithm.h"
41 
43 class vtkDataArray;
44 
45 class VTKIMAGINGHYBRID_EXPORT vtkSampleFunction : public vtkImageAlgorithm
46 {
47 public:
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
56 
58 
62  vtkGetObjectMacro(ImplicitFunction,vtkImplicitFunction);
64 
66 
69  vtkSetMacro(OutputScalarType,int);
70  vtkGetMacro(OutputScalarType,int);
72  {this->SetOutputScalarType(VTK_DOUBLE);}
74  {this->SetOutputScalarType(VTK_FLOAT);}
76  {this->SetOutputScalarType(VTK_LONG);}
78  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
80  {this->SetOutputScalarType(VTK_INT);}
82  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
84  {this->SetOutputScalarType(VTK_SHORT);}
86  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
88  {this->SetOutputScalarType(VTK_CHAR);}
90  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
92 
96  void SetSampleDimensions(int i, int j, int k);
97 
99 
102  void SetSampleDimensions(int dim[3]);
103  vtkGetVectorMacro(SampleDimensions,int,3);
105 
107 
111  void SetModelBounds(const double bounds[6]);
112  void SetModelBounds(double xMin, double xMax,
113  double yMin, double yMax,
114  double zMin, double zMax);
115  vtkGetVectorMacro(ModelBounds,double,6);
117 
119 
124  vtkSetMacro(Capping,int);
125  vtkGetMacro(Capping,int);
126  vtkBooleanMacro(Capping,int);
128 
130 
133  vtkSetMacro(CapValue,double);
134  vtkGetMacro(CapValue,double);
136 
138 
141  vtkSetMacro(ComputeNormals,int);
142  vtkGetMacro(ComputeNormals,int);
143  vtkBooleanMacro(ComputeNormals,int);
145 
147 
151  vtkSetStringMacro(ScalarArrayName);
152  vtkGetStringMacro(ScalarArrayName);
154 
156 
160  vtkSetStringMacro(NormalArrayName);
161  vtkGetStringMacro(NormalArrayName);
163 
168 
169 protected:
178 
180 
182 
187  void Cap(vtkDataArray *s);
188 
190  int SampleDimensions[3];
191  double ModelBounds[6];
192  int Capping;
193  double CapValue;
198 
199 private:
200  vtkSampleFunction(const vtkSampleFunction&) VTK_DELETE_FUNCTION;
201  void operator=(const vtkSampleFunction&) VTK_DELETE_FUNCTION;
202 };
203 
204 #endif
205 
206 
vtkSampleFunction::SetOutputScalarTypeToFloat
void SetOutputScalarTypeToFloat()
Definition: vtkSampleFunction.h:73
vtkSampleFunction::SetModelBounds
void SetModelBounds(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax)
vtkSampleFunction::Capping
int Capping
Definition: vtkSampleFunction.h:192
VTK_UNSIGNED_INT
#define VTK_UNSIGNED_INT
Definition: vtkType.h:55
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
VTK_UNSIGNED_SHORT
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:53
vtkImageAlgorithm.h
vtkSampleFunction::SetOutputScalarTypeToShort
void SetOutputScalarTypeToShort()
Definition: vtkSampleFunction.h:83
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:41
vtkSampleFunction::ScalarArrayName
char * ScalarArrayName
Definition: vtkSampleFunction.h:196
vtkSampleFunction::SetOutputScalarTypeToDouble
void SetOutputScalarTypeToDouble()
Definition: vtkSampleFunction.h:71
vtkSampleFunction::OutputScalarType
int OutputScalarType
Definition: vtkSampleFunction.h:189
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
vtkImplicitFunction
abstract interface for implicit functions
Definition: vtkImplicitFunction.h:59
vtkSampleFunction::SetOutputScalarTypeToUnsignedShort
void SetOutputScalarTypeToUnsignedShort()
Definition: vtkSampleFunction.h:85
vtkSampleFunction::NormalArrayName
char * NormalArrayName
Definition: vtkSampleFunction.h:197
vtkSampleFunction::SetOutputScalarTypeToUnsignedLong
void SetOutputScalarTypeToUnsignedLong()
Definition: vtkSampleFunction.h:77
vtkSampleFunction::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
VTK_CHAR
#define VTK_CHAR
Definition: vtkType.h:49
vtkSampleFunction::CapValue
double CapValue
Definition: vtkSampleFunction.h:193
vtkSampleFunction
sample an implicit function over a structured point set
Definition: vtkSampleFunction.h:46
vtkSampleFunction::SetOutputScalarTypeToUnsignedChar
void SetOutputScalarTypeToUnsignedChar()
Definition: vtkSampleFunction.h:89
vtkSampleFunction::SetImplicitFunction
virtual void SetImplicitFunction(vtkImplicitFunction *)
Specify the implicit function to use to generate data.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkSampleFunction::ReportReferences
void ReportReferences(vtkGarbageCollector *) override
VTK_FLOAT
#define VTK_FLOAT
Definition: vtkType.h:58
vtkSampleFunction::GetMTime
vtkMTimeType GetMTime()
Return the MTime also considering the implicit function.
VTK_DOUBLE
#define VTK_DOUBLE
Definition: vtkType.h:59
VTK_UNSIGNED_CHAR
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:51
vtkSampleFunction::SetOutputScalarTypeToLong
void SetOutputScalarTypeToLong()
Definition: vtkSampleFunction.h:75
VTK_LONG
#define VTK_LONG
Definition: vtkType.h:56
vtkSampleFunction::~vtkSampleFunction
~vtkSampleFunction()
vtkSampleFunction::SetOutputScalarTypeToInt
void SetOutputScalarTypeToInt()
Definition: vtkSampleFunction.h:79
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkGarbageCollector
Detect and break reference loops.
Definition: vtkGarbageCollector.h:100
VTK_UNSIGNED_LONG
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:57
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
VTK_SHORT
#define VTK_SHORT
Definition: vtkType.h:52
vtkSampleFunction::Cap
void Cap(vtkDataArray *s)
vtkSampleFunction::SetSampleDimensions
void SetSampleDimensions(int dim[3])
Specify the dimensions of the data on which to sample.
vtkSampleFunction::ImplicitFunction
vtkImplicitFunction * ImplicitFunction
Definition: vtkSampleFunction.h:194
vtkSampleFunction::SetSampleDimensions
void SetSampleDimensions(int i, int j, int k)
Specify the dimensions of the data on which to sample.
vtkSampleFunction::SetOutputScalarTypeToChar
void SetOutputScalarTypeToChar()
Definition: vtkSampleFunction.h:87
vtkSampleFunction::SetOutputScalarTypeToUnsignedInt
void SetOutputScalarTypeToUnsignedInt()
Definition: vtkSampleFunction.h:81
VTK_INT
#define VTK_INT
Definition: vtkType.h:54
vtkSampleFunction::ExecuteDataWithInformation
void ExecuteDataWithInformation(vtkDataObject *, vtkInformation *)
This is a convenience method that is implemented in many subclasses instead of RequestData.
vtkSampleFunction::vtkSampleFunction
vtkSampleFunction()
Default constructor.
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkSampleFunction::New
static vtkSampleFunction * New()
Construct with ModelBounds=(-1,1,-1,1,-1,1), SampleDimensions=(50,50,50), Capping turned off,...
vtkSampleFunction::ComputeNormals
int ComputeNormals
Definition: vtkSampleFunction.h:195
vtkSampleFunction::RequestInformation
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkSampleFunction::SetModelBounds
void SetModelBounds(const double bounds[6])
Specify the region in space over which the sampling occurs.