Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# vtkSampleFunction Class Reference

`#include <vtkSampleFunction.h>`

Inheritance diagram for vtkSampleFunction:

[legend]
Collaboration diagram for vtkSampleFunction:

[legend]
List of all members.

## Detailed Description

sample an implicit function over a structured point set

Date:
  2002/12/11 14:26:22

Revision:
  1.45

vtkSampleFunction is a source object that evaluates an implicit function and normals at each point in a vtkStructuredPoints. The user can specify the sample dimensions and location in space to perform the sampling. To create closed surfaces (in conjunction with the vtkContourFilter), capping can be turned on to set a particular value on the boundaries of the sample space.

See also:
  vtkImplicitModeller

Created by:
  - Schroeder, Will

CVS contributions (if > 5%):
  - Schroeder, Will (53%)
  - Martin, Ken (26%)
  - Lorensen, Bill (6%)

CVS logs (CVSweb):
  - .`h` (`/Imaging/vtkSampleFunction.h)`
  - .`cxx` (`/Imaging/vtkSampleFunction.cxx)`

Examples:
  vtkSampleFunction (Examples)

Tests:
  vtkSampleFunction (Tests)

Definition at line 59 of file vtkSampleFunction.h.

## Public Types

typedef vtkImageSource | Superclass

## Public Methods

virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | PrintSelf (ostream &os, vtkIndent indent)
virtual void | SetScalars (vtkDataArray *da)
void | SetSampleDimensions (int i, int j, int k)
unsigned long | GetMTime ()
virtual void | SetImplicitFunction (vtkImplicitFunction *)
virtual vtkImplicitFunction * | GetImplicitFunction ()
virtual void | SetOutputScalarType (int)
virtual int | GetOutputScalarType ()
void | SetOutputScalarTypeToDouble ()
void | SetOutputScalarTypeToFloat ()
void | SetOutputScalarTypeToLong ()
void | SetOutputScalarTypeToUnsignedLong ()
void | SetOutputScalarTypeToInt ()
void | SetOutputScalarTypeToUnsignedInt ()
void | SetOutputScalarTypeToShort ()
void | SetOutputScalarTypeToUnsignedShort ()
void | SetOutputScalarTypeToChar ()
void | SetOutputScalarTypeToUnsignedChar ()
void | SetSampleDimensions (int dim[3])
virtual int * | GetSampleDimensions ()
virtual void | GetSampleDimensions (int data[3])
virtual void | SetModelBounds (float, float, float, float, float, float)
virtual void | SetModelBounds (float[6])
virtual float * | GetModelBounds ()
virtual void | GetModelBounds (float data[6])
virtual void | SetCapping (int)
virtual int | GetCapping ()
virtual void | CappingOn ()
virtual void | CappingOff ()
virtual void | SetCapValue (float)
virtual float | GetCapValue ()
virtual void | SetComputeNormals (int)
virtual int | GetComputeNormals ()
virtual void | ComputeNormalsOn ()
virtual void | ComputeNormalsOff ()

## Static Public Methods

int | IsTypeOf (const char *type)
vtkSampleFunction * | SafeDownCast (vtkObject *o)
vtkSampleFunction * | New ()

## Protected Methods

| vtkSampleFunction ()
| ~vtkSampleFunction ()
void | ExecuteData (vtkDataObject *)
void | ExecuteInformation ()
void | Cap (vtkDataArray *s)

## Protected Attributes

int | OutputScalarType
int | SampleDimensions [3]
float | ModelBounds [6]
int | Capping
float | CapValue
vtkImplicitFunction * | ImplicitFunction
int | ComputeNormals

## Member Typedef Documentation

typedef vtkImageSource vtkSampleFunction::Superclass

| Reimplemented from vtkImageSource. Definition at line 62 of file vtkSampleFunction.h.

## Constructor & Destructor Documentation

vtkSampleFunction::vtkSampleFunction | ( |  | ) | `[protected]`

vtkSampleFunction::~vtkSampleFunction | ( |  | ) | `[protected]`

## Member Function Documentation

virtual const char* vtkSampleFunction::GetClassName | ( |  | ) | `[virtual]`

| Reimplemented from vtkImageSource.

int vtkSampleFunction::IsTypeOf | ( | const char * | type | ) | `[static]`

| Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkImageSource.

virtual int vtkSampleFunction::IsA | ( | const char * | type | ) | `[virtual]`

| Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkImageSource.

vtkSampleFunction* vtkSampleFunction::SafeDownCast | ( | vtkObject * | o | ) | `[static]`

| Reimplemented from vtkImageSource.

void vtkSampleFunction::PrintSelf | ( | ostream & | os,
|  | vtkIndent | indent
| ) | `[virtual]`

| Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkImageSource.

vtkSampleFunction* vtkSampleFunction::New | ( |  | ) | `[static]`

| Construct with ModelBounds=(-1,1,-1,1,-1,1), SampleDimensions=(50,50,50), Capping turned off, and normal generation on. Reimplemented from vtkObject.

virtual void vtkSampleFunction::SetImplicitFunction | ( | vtkImplicitFunction * |  | ) | `[virtual]`

| Specify the implicit function to use to generate data.

virtual vtkImplicitFunction* vtkSampleFunction::GetImplicitFunction | ( |  | ) | `[virtual]`

| Specify the implicit function to use to generate data.

virtual void vtkSampleFunction::SetOutputScalarType | ( | int |  | ) | `[virtual]`

| Set what type of scalar data this source should generate.

virtual int vtkSampleFunction::GetOutputScalarType | ( |  | ) | `[virtual]`

| Set what type of scalar data this source should generate.

void vtkSampleFunction::SetOutputScalarTypeToDouble | ( |  | ) | `[inline]`

| Set what type of scalar data this source should generate. Definition at line 80 of file vtkSampleFunction.h. References VTK_DOUBLE.

void vtkSampleFunction::SetOutputScalarTypeToFloat | ( |  | ) | `[inline]`

| Set what type of scalar data this source should generate. Definition at line 82 of file vtkSampleFunction.h. References VTK_FLOAT.

void vtkSampleFunction::SetOutputScalarTypeToLong | ( |  | ) | `[inline]`

| Set what type of scalar data this source should generate. Definition at line 84 of file vtkSampleFunction.h. References VTK_LONG.

void vtkSampleFunction::SetOutputScalarTypeToUnsignedLong | ( |  | ) | `[inline]`

| Set what type of scalar data this source should generate. Definition at line 86 of file vtkSampleFunction.h. References VTK_UNSIGNED_LONG.

void vtkSampleFunction::SetOutputScalarTypeToInt | ( |  | ) | `[inline]`

| Set what type of scalar data this source should generate. Definition at line 88 of file vtkSampleFunction.h. References VTK_INT.

void vtkSampleFunction::SetOutputScalarTypeToUnsignedInt | ( |  | ) | `[inline]`

| Set what type of scalar data this source should generate. Definition at line 90 of file vtkSampleFunction.h. References VTK_UNSIGNED_INT.

void vtkSampleFunction::SetOutputScalarTypeToShort | ( |  | ) | `[inline]`

| Set what type of scalar data this source should generate. Definition at line 92 of file vtkSampleFunction.h. References VTK_SHORT.

void vtkSampleFunction::SetOutputScalarTypeToUnsignedShort | ( |  | ) | `[inline]`

| Set what type of scalar data this source should generate. Definition at line 94 of file vtkSampleFunction.h. References VTK_UNSIGNED_SHORT.

void vtkSampleFunction::SetOutputScalarTypeToChar | ( |  | ) | `[inline]`

| Set what type of scalar data this source should generate. Definition at line 96 of file vtkSampleFunction.h. References VTK_CHAR.

void vtkSampleFunction::SetOutputScalarTypeToUnsignedChar | ( |  | ) | `[inline]`

| Set what type of scalar data this source should generate. Definition at line 98 of file vtkSampleFunction.h. References VTK_UNSIGNED_CHAR.

virtual void vtkSampleFunction::SetScalars | ( | vtkDataArray * | da | ) | `[virtual]`

| Control the type of the scalars object by explicitly providing a scalar object. THIS IS DEPRECATED, although it still works!!! Please use SetOutputScalarType instead.

void vtkSampleFunction::SetSampleDimensions | ( | int | i,
|  | int | j,
|  | int | k
| ) |

| Specify the dimensions of the data on which to sample.

void vtkSampleFunction::SetSampleDimensions | ( | int | dim[3] | ) |

| Specify the dimensions of the data on which to sample.

virtual int* vtkSampleFunction::GetSampleDimensions | ( |  | ) | `[virtual]`

| Specify the dimensions of the data on which to sample.

virtual void vtkSampleFunction::GetSampleDimensions | ( | int | data[3] | ) | `[virtual]`

| Specify the dimensions of the data on which to sample.

virtual void vtkSampleFunction::SetModelBounds | ( | float | ,
|  | float | ,
|  | float | ,
|  | float | ,
|  | float | ,
|  | float |
| ) | `[virtual]`

| Specify the region in space over which the sampling occurs.

virtual void vtkSampleFunction::SetModelBounds | ( | float | [6] | ) | `[virtual]`

| Specify the region in space over which the sampling occurs.

virtual float* vtkSampleFunction::GetModelBounds | ( |  | ) | `[virtual]`

| Specify the region in space over which the sampling occurs.

virtual void vtkSampleFunction::GetModelBounds | ( | float | data[6] | ) | `[virtual]`

| Specify the region in space over which the sampling occurs.

virtual void vtkSampleFunction::SetCapping | ( | int |  | ) | `[virtual]`

| Turn on/off capping. If capping is on, then the outer boundaries of the structured point set are set to cap value. This can be used to insure surfaces are closed.

virtual int vtkSampleFunction::GetCapping | ( |  | ) | `[virtual]`

| Turn on/off capping. If capping is on, then the outer boundaries of the structured point set are set to cap value. This can be used to insure surfaces are closed.

virtual void vtkSampleFunction::CappingOn | ( |  | ) | `[virtual]`

| Turn on/off capping. If capping is on, then the outer boundaries of the structured point set are set to cap value. This can be used to insure surfaces are closed.

virtual void vtkSampleFunction::CappingOff | ( |  | ) | `[virtual]`

| Turn on/off capping. If capping is on, then the outer boundaries of the structured point set are set to cap value. This can be used to insure surfaces are closed.

virtual void vtkSampleFunction::SetCapValue | ( | float |  | ) | `[virtual]`

| Set the cap value.

virtual float vtkSampleFunction::GetCapValue | ( |  | ) | `[virtual]`

| Set the cap value.

virtual void vtkSampleFunction::SetComputeNormals | ( | int |  | ) | `[virtual]`

| Turn on/off the computation of normals.

virtual int vtkSampleFunction::GetComputeNormals | ( |  | ) | `[virtual]`

| Turn on/off the computation of normals.

virtual void vtkSampleFunction::ComputeNormalsOn | ( |  | ) | `[virtual]`

| Turn on/off the computation of normals.

virtual void vtkSampleFunction::ComputeNormalsOff | ( |  | ) | `[virtual]`

| Turn on/off the computation of normals.

unsigned long vtkSampleFunction::GetMTime | ( |  | ) | `[virtual]`

| Return the MTime also considering the implicit function. Reimplemented from vtkObject.

void vtkSampleFunction::ExecuteData | ( | vtkDataObject * |  | ) | `[protected]`

void vtkSampleFunction::ExecuteInformation | ( |  | ) | `[protected, virtual]`

| Reimplemented from vtkSource.

void vtkSampleFunction::Cap | ( | vtkDataArray * | s | ) | `[protected]`

## Member Data Documentation

int vtkSampleFunction::OutputScalarType`[protected]`

| Definition at line 155 of file vtkSampleFunction.h.

int vtkSampleFunction::SampleDimensions[3]`[protected]`

| Definition at line 156 of file vtkSampleFunction.h.

float vtkSampleFunction::ModelBounds[6]`[protected]`

| Definition at line 157 of file vtkSampleFunction.h.

int vtkSampleFunction::Capping`[protected]`

| Definition at line 158 of file vtkSampleFunction.h.

float vtkSampleFunction::CapValue`[protected]`

| Definition at line 159 of file vtkSampleFunction.h.

vtkImplicitFunction* vtkSampleFunction::ImplicitFunction`[protected]`

| Definition at line 160 of file vtkSampleFunction.h.

int vtkSampleFunction::ComputeNormals`[protected]`

| Definition at line 161 of file vtkSampleFunction.h.

The documentation for this class was generated from the following file:

- Imaging/vtkSampleFunction.h