VTK
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
vtkFiniteDifferenceGradientEstimator Class Reference

Use finite differences to estimate gradient. More...

#include <vtkFiniteDifferenceGradientEstimator.h>

Inheritance diagram for vtkFiniteDifferenceGradientEstimator:
[legend]
Collaboration diagram for vtkFiniteDifferenceGradientEstimator:
[legend]

Public Types

typedef vtkEncodedGradientEstimator Superclass
 
- Public Types inherited from vtkEncodedGradientEstimator
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkFiniteDifferenceGradientEstimatorNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void SetSampleSpacingInVoxels (int)
 
virtual int GetSampleSpacingInVoxels ()
 
- Public Member Functions inherited from vtkEncodedGradientEstimator
vtkEncodedGradientEstimatorNewInstance () const
 
void Update (void)
 
unsigned short * GetEncodedNormals (void)
 
unsigned char * GetGradientMagnitudes (void)
 
virtual int GetUseCylinderClip ()
 
intGetCircleLimits ()
 
virtual intGetInputSize ()
 
virtual void GetInputSize (int data[3])
 
virtual floatGetInputAspect ()
 
virtual void GetInputAspect (float data[3])
 
virtual void SetInputData (vtkImageData *)
 
virtual vtkImageDataGetInputData ()
 
virtual void SetGradientMagnitudeScale (float)
 
virtual float GetGradientMagnitudeScale ()
 
virtual void SetGradientMagnitudeBias (float)
 
virtual float GetGradientMagnitudeBias ()
 
virtual void SetBoundsClip (int)
 
virtual int GetBoundsClip ()
 
virtual void BoundsClipOn ()
 
virtual void BoundsClipOff ()
 
virtual void SetBounds (int, int, int, int, int, int)
 
virtual void SetBounds (int[6])
 
virtual intGetBounds ()
 
virtual void GetBounds (int data[6])
 
int GetEncodedNormalIndex (vtkIdType xyz_index)
 
int GetEncodedNormalIndex (int x_index, int y_index, int z_index)
 
virtual void SetNumberOfThreads (int)
 
virtual int GetNumberOfThreads ()
 
void SetDirectionEncoder (vtkDirectionEncoder *direnc)
 
virtual vtkDirectionEncoderGetDirectionEncoder ()
 
virtual void SetComputeGradientMagnitudes (int)
 
virtual int GetComputeGradientMagnitudes ()
 
virtual void ComputeGradientMagnitudesOn ()
 
virtual void ComputeGradientMagnitudesOff ()
 
virtual void SetCylinderClip (int)
 
virtual int GetCylinderClip ()
 
virtual void CylinderClipOn ()
 
virtual void CylinderClipOff ()
 
virtual float GetLastUpdateTimeInSeconds ()
 
virtual float GetLastUpdateTimeInCPUSeconds ()
 
void SetZeroNormalThreshold (float v)
 
virtual float GetZeroNormalThreshold ()
 
virtual void SetZeroPad (int)
 
virtual int GetZeroPad ()
 
virtual void ZeroPadOn ()
 
virtual void ZeroPadOff ()
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkFiniteDifferenceGradientEstimatorSafeDownCast (vtkObjectBase *o)
 
static vtkFiniteDifferenceGradientEstimatorNew ()
 
- Static Public Member Functions inherited from vtkEncodedGradientEstimator
static int IsTypeOf (const char *type)
 
static vtkEncodedGradientEstimatorSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Public Attributes

int SampleSpacingInVoxels
 
- Public Attributes inherited from vtkEncodedGradientEstimator
vtkImageDataInputData
 
unsigned short * EncodedNormals
 
int EncodedNormalsSize [3]
 
unsigned char * GradientMagnitudes
 
vtkTimeStamp BuildTime
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkFiniteDifferenceGradientEstimator ()
 
 ~vtkFiniteDifferenceGradientEstimator ()
 
- Protected Member Functions inherited from vtkEncodedGradientEstimator
 vtkEncodedGradientEstimator ()
 
 ~vtkEncodedGradientEstimator ()
 
virtual void ReportReferences (vtkGarbageCollector *)
 
void ComputeCircleLimits (int size)
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 
void UpdateNormals (void)
 

Additional Inherited Members

- Protected Attributes inherited from vtkEncodedGradientEstimator
int NumberOfThreads
 
vtkMultiThreaderThreader
 
vtkDirectionEncoderDirectionEncoder
 
float GradientMagnitudeScale
 
float GradientMagnitudeBias
 
float LastUpdateTimeInSeconds
 
float LastUpdateTimeInCPUSeconds
 
float ZeroNormalThreshold
 
int CylinderClip
 
intCircleLimits
 
int CircleLimitsSize
 
int UseCylinderClip
 
int BoundsClip
 
int Bounds [6]
 
int InputSize [3]
 
float InputAspect [3]
 
int ComputeGradientMagnitudes
 
int ZeroPad
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

Use finite differences to estimate gradient.

vtkFiniteDifferenceGradientEstimator is a concrete subclass of vtkEncodedGradientEstimator that uses a central differences technique to estimate the gradient. The gradient at some sample location (x,y,z) would be estimated by:

 nx = (f(x-dx,y,z) - f(x+dx,y,z)) / 2*dx;
 ny = (f(x,y-dy,z) - f(x,y+dy,z)) / 2*dy;
 nz = (f(x,y,z-dz) - f(x,y,z+dz)) / 2*dz;

This value is normalized to determine a unit direction vector and a magnitude. The normal is computed in voxel space, and dx = dy = dz = SampleSpacingInVoxels. A scaling factor is applied to convert this normal from voxel space to world coordinates.

See also
vtkEncodedGradientEstimator
Tests:
vtkFiniteDifferenceGradientEstimator (Tests)

Definition at line 47 of file vtkFiniteDifferenceGradientEstimator.h.

Member Typedef Documentation

Definition at line 50 of file vtkFiniteDifferenceGradientEstimator.h.

Constructor & Destructor Documentation

vtkFiniteDifferenceGradientEstimator::vtkFiniteDifferenceGradientEstimator ( )
protected
vtkFiniteDifferenceGradientEstimator::~vtkFiniteDifferenceGradientEstimator ( )
protected

Member Function Documentation

static int vtkFiniteDifferenceGradientEstimator::IsTypeOf ( const char *  type)
static
virtual int vtkFiniteDifferenceGradientEstimator::IsA ( const char *  name)
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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkEncodedGradientEstimator.

static vtkFiniteDifferenceGradientEstimator* vtkFiniteDifferenceGradientEstimator::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkFiniteDifferenceGradientEstimator::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkEncodedGradientEstimator.

vtkFiniteDifferenceGradientEstimator* vtkFiniteDifferenceGradientEstimator::NewInstance ( ) const
void vtkFiniteDifferenceGradientEstimator::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 vtkEncodedGradientEstimator.

static vtkFiniteDifferenceGradientEstimator* vtkFiniteDifferenceGradientEstimator::New ( )
static

Construct a vtkFiniteDifferenceGradientEstimator with a SampleSpacingInVoxels of 1.

virtual void vtkFiniteDifferenceGradientEstimator::SetSampleSpacingInVoxels ( int  )
virtual

Set/Get the spacing between samples for the finite differences method used to compute the normal. This spacing is in voxel units.

virtual int vtkFiniteDifferenceGradientEstimator::GetSampleSpacingInVoxels ( )
virtual

Set/Get the spacing between samples for the finite differences method used to compute the normal. This spacing is in voxel units.

void vtkFiniteDifferenceGradientEstimator::UpdateNormals ( void  )
protectedvirtual

Recompute the encoded normals and gradient magnitudes.

Implements vtkEncodedGradientEstimator.

Member Data Documentation

int vtkFiniteDifferenceGradientEstimator::SampleSpacingInVoxels

Definition at line 61 of file vtkFiniteDifferenceGradientEstimator.h.


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