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 =========================================================================*/
35 #ifndef __vtkSampleFunction_h
36 #define __vtkSampleFunction_h
37 
38 #include "vtkImagingHybridModule.h" // For export macro
39 #include "vtkImageAlgorithm.h"
40 
42 class vtkDataArray;
43 
45 {
46 public:
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
53  static vtkSampleFunction *New();
54 
56 
57  virtual void SetImplicitFunction(vtkImplicitFunction*);
58  vtkGetObjectMacro(ImplicitFunction,vtkImplicitFunction);
60 
62 
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  VTK_LEGACY(virtual void SetScalars(vtkDataArray *da));
91 
93  void SetSampleDimensions(int i, int j, int k);
94 
96 
97  void SetSampleDimensions(int dim[3]);
98  vtkGetVectorMacro(SampleDimensions,int,3);
100 
102 
104  void SetModelBounds(const double bounds[6]);
105  void SetModelBounds(double xMin, double xMax,
106  double yMin, double yMax,
107  double zMin, double zMax);
108  vtkGetVectorMacro(ModelBounds,double,6);
110 
112 
115  vtkSetMacro(Capping,int);
116  vtkGetMacro(Capping,int);
117  vtkBooleanMacro(Capping,int);
119 
121 
122  vtkSetMacro(CapValue,double);
123  vtkGetMacro(CapValue,double);
125 
127 
128  vtkSetMacro(ComputeNormals,int);
129  vtkGetMacro(ComputeNormals,int);
130  vtkBooleanMacro(ComputeNormals,int);
132 
134 
136  vtkSetStringMacro(ScalarArrayName);
137  vtkGetStringMacro(ScalarArrayName);
139 
141 
143  vtkSetStringMacro(NormalArrayName);
144  vtkGetStringMacro(NormalArrayName);
146 
148  unsigned long GetMTime();
149 
150 protected:
157 
159 
160  virtual void ReportReferences(vtkGarbageCollector*);
161 
163  virtual int RequestInformation (vtkInformation *,
166  void Cap(vtkDataArray *s);
167 
169  int SampleDimensions[3];
170  double ModelBounds[6];
171  int Capping;
172  double CapValue;
177 
178 private:
179  vtkSampleFunction(const vtkSampleFunction&); // Not implemented.
180  void operator=(const vtkSampleFunction&); // Not implemented.
181 };
182 
183 #endif
184 
185 
abstract interface for implicit functions
sample an implicit function over a structured point set
#define VTK_UNSIGNED_INT
Definition: vtkType.h:32
Store vtkAlgorithm input/output information.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:30
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
virtual void ExecuteDataWithInformation(vtkDataObject *output, vtkInformation *outInfo)
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:94
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
Detect and break reference loops.
virtual void ReportReferences(vtkGarbageCollector *)
#define VTK_DOUBLE
Definition: vtkType.h:36
void SetOutputScalarTypeToShort()
#define VTK_FLOAT
Definition: vtkType.h:35
void SetOutputScalarTypeToUnsignedShort()
void SetOutputScalarTypeToDouble()
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
#define VTK_SHORT
Definition: vtkType.h:29
void SetOutputScalarTypeToLong()
#define VTK_CHAR
Definition: vtkType.h:26
#define VTK_LONG
Definition: vtkType.h:33
void SetOutputScalarTypeToUnsignedLong()
#define vtkGetStringMacro(name)
Definition: vtkSetGet.h:120
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:222
vtkImplicitFunction * ImplicitFunction
#define VTK_LEGACY(method)
Definition: vtkSetGet.h:787
void SetOutputScalarTypeToUnsignedChar()
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:28
GLdouble s
Definition: vtkgl.h:11594
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent)
static vtkAlgorithm * New()
#define vtkBooleanMacro(name, type)
Definition: vtkSetGet.h:234
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:34
#define VTKIMAGINGHYBRID_EXPORT
void SetOutputScalarTypeToFloat()
general representation of visualization data
Definition: vtkDataObject.h:64
void SetOutputScalarTypeToUnsignedInt()
#define vtkGetVectorMacro(name, type, count)
Definition: vtkSetGet.h:414
#define VTK_INT
Definition: vtkType.h:31
void SetOutputScalarTypeToChar()
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69